/usr/share/php/Nette/Http/IResponse.php is in php-nette 2.1.0-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 | <?php
/**
* This file is part of the Nette Framework (http://nette.org)
* Copyright (c) 2004 David Grudl (http://davidgrudl.com)
*/
namespace Nette\Http;
use Nette;
/**
* IHttpResponse interface.
*
* @author David Grudl
*/
interface IResponse
{
/** @var int cookie expiration: forever (23.1.2037) */
const PERMANENT = 2116333333;
/** @var int cookie expiration: until the browser is closed */
const BROWSER = 0;
/** HTTP 1.1 response code */
const
S200_OK = 200,
S204_NO_CONTENT = 204,
S300_MULTIPLE_CHOICES = 300,
S301_MOVED_PERMANENTLY = 301,
S302_FOUND = 302,
S303_SEE_OTHER = 303,
S303_POST_GET = 303,
S304_NOT_MODIFIED = 304,
S307_TEMPORARY_REDIRECT= 307,
S400_BAD_REQUEST = 400,
S401_UNAUTHORIZED = 401,
S403_FORBIDDEN = 403,
S404_NOT_FOUND = 404,
S405_METHOD_NOT_ALLOWED = 405,
S410_GONE = 410,
S500_INTERNAL_SERVER_ERROR = 500,
S501_NOT_IMPLEMENTED = 501,
S503_SERVICE_UNAVAILABLE = 503;
/**
* Sets HTTP response code.
* @param int
* @return void
*/
function setCode($code);
/**
* Returns HTTP response code.
* @return int
*/
function getCode();
/**
* Sends a HTTP header and replaces a previous one.
* @param string header name
* @param string header value
* @return void
*/
function setHeader($name, $value);
/**
* Adds HTTP header.
* @param string header name
* @param string header value
* @return void
*/
function addHeader($name, $value);
/**
* Sends a Content-type HTTP header.
* @param string mime-type
* @param string charset
* @return void
*/
function setContentType($type, $charset = NULL);
/**
* Redirects to a new URL.
* @param string URL
* @param int HTTP code
* @return void
*/
function redirect($url, $code = self::S302_FOUND);
/**
* Sets the number of seconds before a page cached on a browser expires.
* @param mixed timestamp or number of seconds
* @return void
*/
function setExpiration($seconds);
/**
* Checks if headers have been sent.
* @return bool
*/
function isSent();
/**
* Returns a list of headers to sent.
* @return array
*/
function getHeaders();
/**
* Sends a cookie.
* @param string name of the cookie
* @param string value
* @param mixed expiration as unix timestamp or number of seconds; Value 0 means "until the browser is closed"
* @param string
* @param string
* @param bool
* @param bool
* @return void
*/
function setCookie($name, $value, $expire, $path = NULL, $domain = NULL, $secure = NULL, $httpOnly = NULL);
/**
* Deletes a cookie.
* @param string name of the cookie.
* @param string
* @param string
* @param bool
* @return void
*/
function deleteCookie($name, $path = NULL, $domain = NULL, $secure = NULL);
}
|