PHP Interface Nette\Http\IResponse

Mostra file Open project: nette/http Interface Usage Examples

Public Methods

Method 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 method

Adds HTTP header.
public addHeader ( $name, $value ) : void
return void

deleteCookie() public method

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

getCode() public method

Returns HTTP response code.
public getCode ( ) : integer
return integer

getHeader() public method

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

getHeaders() public method

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

isSent() public method

Checks if headers have been sent.
public isSent ( ) : boolean
return boolean

redirect() public method

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

setCode() public method

Sets HTTP response code.
public setCode ( $code ) : void
return void

setContentType() public method

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

setCookie() public method

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

setExpiration() public method

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

setHeader() public method

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