Documentation

AbstractRequest extends AbstractHttp
in package
Uses FilterableTrait

Abstract HTTP request class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

Copyright (c) 2009-2021 NOLA Interactive, LLC. (http://www.nolainteractive.com)

license

http://www.popphp.org/license New BSD License

version
4.1.0

Table of Contents

$body  : Body
Body
$filters  : array<string|int, mixed>
Form filters
$headers  : array<string|int, mixed>
Headers
__construct()  : mixed
Constructor
__get()  : mixed
Magic method to get either the headers or body
addFilter()  : FilterableTrait
Add filter
addFilters()  : FilterableTrait
Add filters
addHeader()  : AbstractHttp
Add a header
addHeaders()  : AbstractHttp
Add all headers
clearFilters()  : FilterableTrait
Clear filters
decodeBodyContent()  : Body
Decode the body
filter()  : mixed
Filter values
filterAll()  : array<string|int, mixed>
Filter all values, ignoring excludes
getBody()  : Body
Get the body
getBodyContent()  : mixed
Get body content
getFilters()  : array<string|int, mixed>
Get filters
getHeader()  : mixed
Get a header
getHeaders()  : array<string|int, mixed>
Get all headers
getHeadersAsArray()  : array<string|int, mixed>
Get all header values as associative array
getHeadersAsString()  : string
Get all header values formatted string
getHeaderValue()  : mixed
Get header value
hasBody()  : bool
Has a body
hasBodyContent()  : bool
Has body content
hasFilters()  : bool
Has filters
hasHeader()  : bool
Has a header
hasHeaders()  : bool
Determine if there are headers
removeBody()  : AbstractHttp
Remove the body
removeHeader()  : AbstractHttp
Remove a header
removeHeaders()  : AbstractHttp
Remove all headers
setBody()  : AbstractHttp
Set the body

Properties

$filters

Form filters

protected array<string|int, mixed> $filters = []

$headers

Headers

protected array<string|int, mixed> $headers = []

Methods

__construct()

Constructor

public __construct([mixed $filters = null ]) : mixed

Instantiate the request object

Parameters
$filters : mixed = null
Return values
mixed

__get()

Magic method to get either the headers or body

public __get(string $name) : mixed
Parameters
$name : string
Return values
mixed

decodeBodyContent()

Decode the body

public decodeBodyContent([string $body = null ]) : Body
Parameters
$body : string = null
Return values
Body

filter()

Filter values

public filter(mixed $values) : mixed
Parameters
$values : mixed
Return values
mixed

filterAll()

Filter all values, ignoring excludes

public filterAll(array<string|int, mixed> $values) : array<string|int, mixed>
Parameters
$values : array<string|int, mixed>
Return values
array<string|int, mixed>

getBodyContent()

Get body content

public getBodyContent() : mixed
Return values
mixed

getFilters()

Get filters

public getFilters() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHeader()

Get a header

public getHeader(string $name) : mixed
Parameters
$name : string
Return values
mixed

getHeaders()

Get all headers

public getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHeadersAsArray()

Get all header values as associative array

public getHeadersAsArray() : array<string|int, mixed>
Return values
array<string|int, mixed>

getHeadersAsString()

Get all header values formatted string

public getHeadersAsString([string $status = null ][, string $eol = " " ]) : string
Parameters
$status : string = null
$eol : string = " "
Return values
string

getHeaderValue()

Get header value

public getHeaderValue(string $name) : mixed
Parameters
$name : string
Return values
mixed

hasBody()

Has a body

public hasBody() : bool
Return values
bool

hasBodyContent()

Has body content

public hasBodyContent() : bool
Return values
bool

hasFilters()

Has filters

public hasFilters() : bool
Return values
bool

hasHeader()

Has a header

public hasHeader(string $name) : bool
Parameters
$name : string
Return values
bool

hasHeaders()

Determine if there are headers

public hasHeaders() : bool
Return values
bool

Search results