namespace Nette\Web
Interface IHttpResponse
IHttpResponse interface.
Direct Known Implementers
HttpResponse
public
void
|
#
setCode(
int
$code
)
Sets HTTP response code. Sets HTTP response code. Parameters$code int |
public
int
|
#
getCode(
)
Returns HTTP response code. Returns HTTP response code. |
public
void
|
#
setHeader(
string
$name,
string
$value
)
Sends a HTTP header and replaces a previous one. Sends a HTTP header and replaces a previous one. Parameters$name string header name$value string header value |
public
void
|
#
addHeader(
string
$name,
string
$value
)
Adds HTTP header. Adds HTTP header. Parameters$name string header name$value string header value |
public
void
|
#
setContentType(
string
$type,
string
$charset = NULL
)
Sends a Content-type HTTP header. Sends a Content-type HTTP header. Parameters$type string mime-type$charset string charset |
public
void
|
#
redirect(
string
$url,
int
$code = 302
)
Redirects to a new URL. Redirects to a new URL. Parameters$url string URL$code int HTTP code |
public
void
|
#
setExpiration(
mixed
$seconds
)
Sets the number of seconds before a page cached on a browser expires. Sets the number of seconds before a page cached on a browser expires. Parameters$seconds mixed timestamp or number of seconds |
public
bool
|
#
isSent(
)
Checks if headers have been sent. Checks if headers have been sent. |
public
array
|
#
getHeaders(
)
Returns a list of headers to sent. Returns a list of headers to sent. |
public
void
|
#
setCookie(
string
$name,
string
$value,
mixed
$expire,
string
$path = NULL,
string
$domain = NULL,
bool
$secure = NULL,
bool
$httpOnly = NULL
)
Sends a cookie. Sends a cookie. Parameters$name string name of the cookie$value string value$expire mixed expiration as unix timestamp or number of seconds; Value 0 means "until the browser is closed"$path string$domain string$secure bool$httpOnly bool |
public
void
|
#
deleteCookie(
string
$name,
string
$path = NULL,
string
$domain = NULL,
bool
$secure = NULL
)
Deletes a cookie. Deletes a cookie. Parameters$name string name of the cookie.$path string$domain string$secure bool |
PERMANENT |
2116333333 # |
BROWSER |
0 # |
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 # |