Properties

$filter

$filter : array

Type

array — Array of filtered Request properties.

$date

$date : 

Type

$base

$base : 

Type

$url

$url : 

Type

$referrer

$referrer : 

Type

$method

$method : 

Type

$ip

$ip : 

Type

$port

$port : 

Type

$scheme

$scheme : 

Type

$user_agent

$user_agent : 

Type

$type

$type : 

Type

$length

$length : 

Type

$accept

$accept : 

Type

$query

$query : 

Type

$data

$data : 

Type

$cookies

$cookies : 

Type

$files

$files : 

Type

$is_https

$is_https : 

Type

$is_ajax

$is_ajax : 

Type

$request_headers

$request_headers : 

Type

Methods

__construct()

__construct(array  $filters) : void

Construct the Request object.

Parameters

array $filters

Array of filtered Request properties.

get_properties()

get_properties() : array

Return Request properties.

Returns

array —

Array of Request properties.

initialize()

initialize(array  $properties) : void

Initialize Request properties.

Parameters

array $properties

Array of request properties.

get_variable()

get_variable(string  $variable, string  $default = "") : string

Get a request variable.

Get a request variable from $_SERVER, or use a $default value.

Parameters

string $variable

Variable name.

string $default

Default value to be used.

Returns

string —

Variable value.

get_method()

get_method() : string

Get the request method.

Returns

string

get_request_body()

get_request_body() : string

Get request body.

Get the body of an HTTP request (used in case of JSON input).

Returns

string —

Raw HTTP request body.

format_url()

format_url() : string

Format URL.

Perform additional formatting of URL.

Returns

string —

Newly formatted URL.

format_json_request_body()

format_json_request_body() : string

Format request body (if working with JSON).

Returns

string —

JSON request body.