Properties

$filters

$filters : array

Form filters

Type

array

$headers

$headers : array

Headers

Type

array

$get

$get : array

GET array

Type

array

$post

$post : array

POST array

Type

array

$files

$files : array

FILES array

Type

array

$put

$put : array

PUT array

Type

array

$patch

$patch : array

PATCH array

Type

array

$delete

$delete : array

DELETE array

Type

array

$queryData

$queryData : mixed

Query data

Type

mixed

$parsedData

$parsedData : mixed

Parsed data

Type

mixed

$rawData

$rawData : mixed

Raw data

Type

mixed

$streamToFile

$streamToFile : boolean

Stream to file

Type

boolean

$streamToFileLocation

$streamToFileLocation : string

Stream to file

Type

string

Methods

__construct()

__construct(string  $contentType = null, string  $encoding = null, mixed  $filters = null, mixed  $streamToFile = null) 

Constructor

Instantiate the request data object

Parameters

string $contentType
string $encoding
mixed $filters
mixed $streamToFile

filter()

filter(mixed  $values) : array

Filter values

Parameters

mixed $values

Returns

array

addFilter()

addFilter(mixed  $filter) : \Pop\Filter\FilterableTrait

Add filter

Parameters

mixed $filter

Throws

\InvalidArgumentException

Returns

\Pop\Filter\FilterableTrait

addFilters()

addFilters(array  $filters) : \Pop\Filter\FilterableTrait

Add filters

Parameters

array $filters

Returns

\Pop\Filter\FilterableTrait

hasFilters()

hasFilters() : boolean

Has filters

Returns

boolean

getFilters()

getFilters() : array

Get filters

Returns

array

filterAll()

filterAll(array  $values) : array

Filter all values, ignoring excludes

Parameters

array $values

Returns

array

addHeader()

addHeader(\Pop\Mime\Part\Header|string  $header, string  $value = null) : \Pop\Http\AbstractHttp

Add a header

Parameters

\Pop\Mime\Part\Header|string $header
string $value

Returns

\Pop\Http\AbstractHttp

addHeaders()

addHeaders(array  $headers) : \Pop\Http\AbstractHttp

Add all headers

Parameters

array $headers

Returns

\Pop\Http\AbstractHttp

getHeader()

getHeader(string  $name) : mixed

Get a header

Parameters

string $name

Returns

mixed

getHeaderValue()

getHeaderValue(string  $name) : mixed

Get header value

Parameters

string $name

Returns

mixed

getHeaders()

getHeaders() : array

Get all headers

Returns

array

getHeadersAsArray()

getHeadersAsArray() : array

Get all header values as associative array

Returns

array

getHeadersAsString()

getHeadersAsString(string  $status = null, string  $eol = "\r\n") : string

Get all header values formatted string

Parameters

string $status
string $eol

Returns

string

hasHeaders()

hasHeaders() : boolean

Determine if there are headers

Returns

boolean

hasHeader()

hasHeader(string  $name) : boolean

Has a header

Parameters

string $name

Returns

boolean

removeHeader()

removeHeader(string  $name) : \Pop\Http\AbstractHttp

Remove a header

Parameters

string $name

Returns

\Pop\Http\AbstractHttp

getBodyContent()

getBodyContent() : mixed

Get body content

Returns

mixed

hasBody()

hasBody() : boolean

Has a body

Returns

boolean

hasBodyContent()

hasBodyContent() : boolean

Has body content

Returns

boolean

decodeBodyContent()

decodeBodyContent(string  $body = null) : \Pop\Mime\Part\Body

Decode the body

Parameters

string $body

Returns

\Pop\Mime\Part\Body

__get()

__get(string  $name) : mixed

Magic method to get a value from one of the data arrays

Parameters

string $name

Returns

mixed

hasFiles()

hasFiles() : boolean

Return whether or not the request has FILES

Returns

boolean

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

getFiles()

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

Get a value from $_FILES, 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

getQueryData()

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

Get a value from query data, 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

hasQueryData()

hasQueryData() : boolean

Has query data

Returns

boolean

hasParsedData()

hasParsedData() : boolean

Has parsed data

Returns

boolean

hasRawData()

hasRawData() : boolean

Has raw data

Returns

boolean

isStreamToFile()

isStreamToFile() : boolean

Is the request stream to file

Returns

boolean

getStreamToFileLocation()

getStreamToFileLocation() : string

Get stream to file location

Returns

string

processData()

processData(string  $contentType = null, string  $encoding = null, mixed  $streamToFile = null) : void

Process any data that came with the request

Parameters

string $contentType
string $encoding
mixed $streamToFile

prepareStreamToFile()

prepareStreamToFile(mixed  $streamToFile) : void

Prepare stream to file

Parameters

mixed $streamToFile

Throws

\Pop\Http\Server\Request\Exception