2015-01-22 14:26:46 -05:00
|
|
|
<?php
|
2024-05-23 03:26:56 -04:00
|
|
|
|
2015-01-22 14:26:46 -05:00
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-FileCopyrightText: 2016 ownCloud, Inc.
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-only
|
2015-01-22 14:26:46 -05:00
|
|
|
*/
|
|
|
|
|
namespace OCP\AppFramework\Http;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Very thin wrapper class to make output testable
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.1.0
|
2015-01-22 14:26:46 -05:00
|
|
|
*/
|
|
|
|
|
interface IOutput {
|
|
|
|
|
/**
|
|
|
|
|
* @param string $out
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.1.0
|
2015-01-22 14:26:46 -05:00
|
|
|
*/
|
|
|
|
|
public function setOutput($out);
|
|
|
|
|
|
|
|
|
|
/**
|
2016-10-27 08:46:28 -04:00
|
|
|
* @param string|resource $path or file handle
|
2015-01-22 14:26:46 -05:00
|
|
|
*
|
2016-04-07 13:51:27 -04:00
|
|
|
* @return bool false if an error occurred
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.1.0
|
2015-01-22 14:26:46 -05:00
|
|
|
*/
|
|
|
|
|
public function setReadfile($path);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $header
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.1.0
|
2015-01-22 14:26:46 -05:00
|
|
|
*/
|
|
|
|
|
public function setHeader($header);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @return int returns the current http response code
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.1.0
|
2015-01-22 14:26:46 -05:00
|
|
|
*/
|
|
|
|
|
public function getHttpResponseCode();
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param int $code sets the http status code
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.1.0
|
2015-01-22 14:26:46 -05:00
|
|
|
*/
|
|
|
|
|
public function setHttpResponseCode($code);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @param string $name
|
|
|
|
|
* @param string $value
|
|
|
|
|
* @param int $expire
|
|
|
|
|
* @param string $path
|
|
|
|
|
* @param string $domain
|
|
|
|
|
* @param bool $secure
|
2015-10-06 09:24:19 -04:00
|
|
|
* @param bool $httpOnly
|
2020-06-19 03:31:47 -04:00
|
|
|
* @param string $sameSite (added in 20)
|
2015-04-16 11:00:08 -04:00
|
|
|
* @since 8.1.0
|
2015-01-22 14:26:46 -05:00
|
|
|
*/
|
2020-06-19 03:31:47 -04:00
|
|
|
public function setCookie($name, $value, $expire, $path, $domain, $secure, $httpOnly, $sameSite = 'Lax');
|
2015-01-22 14:26:46 -05:00
|
|
|
}
|