1
0

IOutput.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <?php
  2. /**
  3. * @copyright Copyright (c) 2016, ownCloud, Inc.
  4. *
  5. * @author Bernhard Posselt <dev@bernhard-posselt.com>
  6. * @author Lukas Reschke <lukas@statuscode.ch>
  7. * @author Morris Jobke <hey@morrisjobke.de>
  8. * @author Robin Appelman <robin@icewind.nl>
  9. * @author Stefan Weil <sw@weilnetz.de>
  10. *
  11. * @license AGPL-3.0
  12. *
  13. * This code is free software: you can redistribute it and/or modify
  14. * it under the terms of the GNU Affero General Public License, version 3,
  15. * as published by the Free Software Foundation.
  16. *
  17. * This program is distributed in the hope that it will be useful,
  18. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  19. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  20. * GNU Affero General Public License for more details.
  21. *
  22. * You should have received a copy of the GNU Affero General Public License, version 3,
  23. * along with this program. If not, see <http://www.gnu.org/licenses/>
  24. *
  25. */
  26. namespace OCP\AppFramework\Http;
  27. /**
  28. * Very thin wrapper class to make output testable
  29. * @since 8.1.0
  30. */
  31. interface IOutput {
  32. /**
  33. * @param string $out
  34. * @since 8.1.0
  35. */
  36. public function setOutput($out);
  37. /**
  38. * @param string|resource $path or file handle
  39. *
  40. * @return bool false if an error occurred
  41. * @since 8.1.0
  42. */
  43. public function setReadfile($path);
  44. /**
  45. * @param string $header
  46. * @since 8.1.0
  47. */
  48. public function setHeader($header);
  49. /**
  50. * @return int returns the current http response code
  51. * @since 8.1.0
  52. */
  53. public function getHttpResponseCode();
  54. /**
  55. * @param int $code sets the http status code
  56. * @since 8.1.0
  57. */
  58. public function setHttpResponseCode($code);
  59. /**
  60. * @param string $name
  61. * @param string $value
  62. * @param int $expire
  63. * @param string $path
  64. * @param string $domain
  65. * @param bool $secure
  66. * @param bool $httpOnly
  67. * @since 8.1.0
  68. */
  69. public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly);
  70. }