Interface IHttpResponse (namespace Nette\Web)
IHttpResponse interface.
Public Method Summary | |
---|---|
void |
addHeader
(string $name, string $value)
Adds HTTP header.
|
void |
Deletes a cookie.
|
void |
expire
(int $time)
Sets the number of seconds before a page cached on a browser expires.
|
int |
getCode
()
Returns HTTP response code.
|
array |
getHeaders
()
Returns a list of headers to sent.
|
bool |
isSent
()
Checks if headers have been sent.
|
void |
redirect
(string $url, [int $code =
self::S302_FOUND ])
Redirects to a new URL.
|
bool |
setCode
(int $code)
Sets HTTP response code.
|
void |
setContentType
(string $type, [string $charset =
NULL ])
Sends a Content-type HTTP header.
|
void |
setCookie
(string $name, string $value, int $expire, [string $path =
NULL ], [string $domain = NULL ], [bool $secure = NULL ])
Sends a cookie.
|
void |
setHeader
(string $name, string $value)
Sends a HTTP header and replaces a previous one.
|
Constant Summary | |||
---|---|---|---|
int | BROWSER |
0 |
line 36 |
int | PERMANENT |
2116333333 |
line 33 |
int | S200_OK |
200 |
line 40 HTTP 1.1 response code |
int | S204_NO_CONTENT |
204 |
line 41 HTTP 1.1 response code |
int | S300_MULTIPLE_CHOICES |
300 |
line 42 HTTP 1.1 response code |
int | S301_MOVED_PERMANENTLY |
301 |
line 43 HTTP 1.1 response code |
int | S302_FOUND |
302 |
line 44 HTTP 1.1 response code |
int | S303_POST_GET |
303 |
line 46 HTTP 1.1 response code |
int | S303_SEE_OTHER |
303 |
line 45 HTTP 1.1 response code |
int | S304_NOT_MODIFIED |
304 |
line 47 HTTP 1.1 response code |
int | S307_TEMPORARY_REDIRECT |
307 |
line 48 HTTP 1.1 response code |
int | S400_BAD_REQUEST |
400 |
line 49 HTTP 1.1 response code |
int | S401_UNAUTHORIZED |
401 |
line 50 HTTP 1.1 response code |
int | S403_FORBIDDEN |
403 |
line 51 HTTP 1.1 response code |
int | S404_NOT_FOUND |
404 |
line 52 HTTP 1.1 response code |
int | S410_GONE |
410 |
line 53 HTTP 1.1 response code |
int | S500_INTERNAL_SERVER_ERROR |
500 |
line 54 HTTP 1.1 response code |
int | S501_NOT_IMPLEMENTED |
501 |
line 55 HTTP 1.1 response code |
int | S503_SERVICE_UNAVAILABLE |
503 |
line 56 HTTP 1.1 response code |
Method Details | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
line 86 addHeaderpublic void addHeader (string $name, string $value) Adds HTTP header.
|
|||||||||||||||||||||
line 143 deleteCookiepublic void deleteCookie (string $name, [string $path = Deletes a cookie.
|
|||||||||||||||||||||
line 109 expirepublic void expire (int $time) Sets the number of seconds before a page cached on a browser expires.
|
|||||||||||||||||||||
line 70 getCodepublic int getCode () Returns HTTP response code. |
|||||||||||||||||||||
line 121 getHeaderspublic array getHeaders () Returns a list of headers to sent. |
|||||||||||||||||||||
line 115 isSentpublic bool isSent () Checks if headers have been sent. |
|||||||||||||||||||||
line 102 redirectpublic void redirect (string $url, [int $code = Redirects to a new URL.
|
|||||||||||||||||||||
line 64 setCodepublic bool setCode (int $code) Sets HTTP response code.
|
|||||||||||||||||||||
line 94 setContentTypepublic void setContentType (string $type, [string $charset = Sends a Content-type HTTP header.
|
|||||||||||||||||||||
line 133 setCookiepublic void setCookie (string $name, string $value, int $expire, [string $path = Sends a cookie.
|
|||||||||||||||||||||
line 78 setHeaderpublic void setHeader (string $name, string $value) Sends a HTTP header and replaces a previous one.
|