Properties

$name

$name : string

Name of time measurement

Type

string

$requestUri

$requestUri : string

Request URI

Type

string

$headers

$headers : array

Headers

Type

array

$server

$server : 

SERVER array

Type

$env

$env : 

ENV array

Type

$get

$get : 

GET array

Type

$post

$post : 

POST array

Type

$put

$put : 

PUT array

Type

$patch

$patch : 

PATCH array

Type

$delete

$delete : 

DELETE array

Type

$files

$files : 

FILES array

Type

$cookie

$cookie : 

COOKIE array

Type

$session

$session : 

SESSION array

Type

$rawData

$rawData : string

Raw data

Type

string

$parsedData

$parsedData : mixed

Parsed data

Type

mixed

$requestTimestamp

$requestTimestamp : float

Request timestamp

Type

float

Methods

__construct()

__construct(string  $name = null) 

Constructor

Instantiate a request handler object

Parameters

string $name

getName()

getName() : string

Get name

Returns

string

prepare()

prepare() : array

Prepare handler data for storage

Returns

array

prepareHeaderAsString()

prepareHeaderAsString() : string

Prepare header string

Returns

string

prepareAsString()

prepareAsString() : string

Prepare handler data as string

Returns

string

getRequestTimestamp()

getRequestTimestamp() : float

Get request timestamp

Returns

float

hasFiles()

hasFiles() : boolean

Return whether or not the request has FILES

Returns

boolean

isGet()

isGet() : boolean

Return whether or not the method is GET

Returns

boolean

isHead()

isHead() : boolean

Return whether or not the method is HEAD

Returns

boolean

isPost()

isPost() : boolean

Return whether or not the method is POST

Returns

boolean

isPut()

isPut() : boolean

Return whether or not the method is PUT

Returns

boolean

isDelete()

isDelete() : boolean

Return whether or not the method is DELETE

Returns

boolean

isTrace()

isTrace() : boolean

Return whether or not the method is TRACE

Returns

boolean

isOptions()

isOptions() : boolean

Return whether or not the method is OPTIONS

Returns

boolean

isConnect()

isConnect() : boolean

Return whether or not the method is CONNECT

Returns

boolean

isPatch()

isPatch() : boolean

Return whether or not the method is PATCH

Returns

boolean

isSecure()

isSecure() : boolean

Return whether or not the request is secure

Returns

boolean

getRequestUri()

getRequestUri() : string

Get the request URI

Returns

string

getDocumentRoot()

getDocumentRoot() : string

Get the document root

Returns

string

getMethod()

getMethod() : string

Get the method

Returns

string

getPort()

getPort() : string

Get the server port

Returns

string

getScheme()

getScheme() : string

Get scheme

Returns

string

getHost()

getHost() : string

Get host without port)

Returns

string

getFullHost()

getFullHost() : string

Get host with port

Returns

string

getIp()

getIp(boolean  $proxy = true) : string

Get client's IP

Parameters

boolean $proxy

Returns

string

getQuery()

getQuery(string  $key = null) : string|array

Get a value from $_GET, or the whole array

Parameters

string $key

Returns

string|array

getPost()

getPost(string  $key = null) : string|array

Get a value from $_POST, or the whole array

Parameters

string $key

Returns

string|array

getPut()

getPut(string  $key = null) : string|array

Get a value from PUT query data, or the whole array

Parameters

string $key

Returns

string|array

getPatch()

getPatch(string  $key = null) : string|array

Get a value from PATCH query data, or the whole array

Parameters

string $key

Returns

string|array

getDelete()

getDelete(string  $key = null) : string|array

Get a value from DELETE query data, or the whole array

Parameters

string $key

Returns

string|array

getFiles()

getFiles(string  $key = null) : string|array

Get a value from $_FILES, or the whole array

Parameters

string $key

Returns

string|array

getServer()

getServer(string  $key = null) : string|array

Get a value from $_SERVER, or the whole array

Parameters

string $key

Returns

string|array

getEnv()

getEnv(string  $key = null) : string|array

Get a value from $_ENV, or the whole array

Parameters

string $key

Returns

string|array

getCookie()

getCookie(string  $key = null) : string|array

Get a value from $_COOKIE, or the whole array

Parameters

string $key

Returns

string|array

getSession()

getSession(string  $key = null) : string|array

Get a value from $_SESSION, or the whole array

Parameters

string $key

Returns

string|array

getParsedData()

getParsedData(string  $key = null) : string|array

Get a value from parsed data, or the whole array

Parameters

string $key

Returns

string|array

getRawData()

getRawData() : string

Get the raw data

Returns

string

getHeader()

getHeader(string  $key) : string

Get a value from the request headers

Parameters

string $key

Returns

string

getHeaders()

getHeaders() : array

Get the request headers

Returns

array

parseData()

parseData() : void

Parse any data that came with the request