Properties

$_path

$_path : string

Request path

Type

string

$_headers

$_headers : array

All the headers

Type

array

$_vars

$_vars : array

Request variables.

Type

array

Methods

setPath()

setPath(  $path) 

Parameters

$path

getPath()

getPath() 

getMethod()

getMethod() 

getGetVars()

getGetVars() 

getFileVars()

getFileVars() 

getServerVars()

getServerVars() 

getPostVars()

getPostVars() 

getRequestBody()

getRequestBody() 

The request body if it is not form-encoded

getCookieVars()

getCookieVars() 

getRequestVars()

getRequestVars() 

getSessionId()

getSessionId() 

getHeader()

getHeader(string  $name) : string

Gets the value of header.

Returns the value of the specified request header.

Parameters

string $name

the name of the header

Returns

string —

the value of the specified header

getHeaderNames()

getHeaderNames() : array

Gets all the header names.

Returns an array of all the header names this request contains.

Returns

array —

all the available headers as strings

getHeaders()

getHeaders() : array

Gets all the headers.

Returns an associative array of all the header names and values of this request.

Returns

array —

containing all the headers

__construct()

__construct(array  $vars = array()) 

Constructor.

Parameters

array $vars

The request variables.

setVars()

setVars(array  $vars) 

Set the request variables GET, POST, COOKIE, SERVER, REQUEST etc.

Parameters

array $vars

The request variables.

getVars()

getVars(string  $name) 

Gets the request variables GET, POST, COOKIE, SERVER, REQUEST etc.

Parameters

string $name

The name of the superglobal whose vars to return

_getAllHeaders()

_getAllHeaders() : array

Returns all HTTP_* headers.

Returns all the HTTP_* headers. Works both if PHP is an apache module and if it's running as a CGI.

Returns

array —

the headers' names and values