PHP Interface Nette\Http\IResponse

Afficher le fichier Open project: nette/http Interface Usage Examples

Méthodes publiques

Méthode Description
addHeader ( $name, $value ) : void Adds HTTP header.
deleteCookie ( $name, $path = NULL, $domain = NULL, $secure = NULL ) : void Deletes a cookie.
getCode ( ) : integer Returns HTTP response code.
getHeader ( $header, $default = NULL ) : mixed Returns value of an HTTP header.
getHeaders ( ) : array Returns a list of headers to sent.
isSent ( ) : boolean Checks if headers have been sent.
redirect ( $url, $code = self::S302_FOUND ) : void Redirects to a new URL.
setCode ( $code ) : void Sets HTTP response code.
setContentType ( $type, $charset = NULL ) : void Sends a Content-type HTTP header.
setCookie ( $name, $value, $expire, $path = NULL, $domain = NULL, $secure = NULL, $httpOnly = NULL ) : void Sends a cookie.
setExpiration ( $seconds ) : void Sets the number of seconds before a page cached on a browser expires.
setHeader ( $name, $value ) : void Sends a HTTP header and replaces a previous one.

Method Details

addHeader() public méthode

Adds HTTP header.
public addHeader ( $name, $value ) : void
Résultat void

deleteCookie() public méthode

Deletes a cookie.
public deleteCookie ( $name, $path = NULL, $domain = NULL, $secure = NULL ) : void
Résultat void

getCode() public méthode

Returns HTTP response code.
public getCode ( ) : integer
Résultat integer

getHeader() public méthode

Returns value of an HTTP header.
public getHeader ( $header, $default = NULL ) : mixed
Résultat mixed

getHeaders() public méthode

Returns a list of headers to sent.
public getHeaders ( ) : array
Résultat array (name => value)

isSent() public méthode

Checks if headers have been sent.
public isSent ( ) : boolean
Résultat boolean

redirect() public méthode

Redirects to a new URL.
public redirect ( $url, $code = self::S302_FOUND ) : void
Résultat void

setCode() public méthode

Sets HTTP response code.
public setCode ( $code ) : void
Résultat void

setContentType() public méthode

Sends a Content-type HTTP header.
public setContentType ( $type, $charset = NULL ) : void
Résultat void

setCookie() public méthode

Sends a cookie.
public setCookie ( $name, $value, $expire, $path = NULL, $domain = NULL, $secure = NULL, $httpOnly = NULL ) : void
Résultat void

setExpiration() public méthode

Sets the number of seconds before a page cached on a browser expires.
public setExpiration ( $seconds ) : void
Résultat void

setHeader() public méthode

Sends a HTTP header and replaces a previous one.
public setHeader ( $name, $value ) : void
Résultat void