Data
        
        extends AbstractRequest
    
    
            
            in package
            
        
    
    
    
        
            HTTP server request data class
Tags
Table of Contents
- $body : Body
- Body
- $delete : array<string|int, mixed>
- DELETE array
- $files : array<string|int, mixed>
- FILES array
- $filters : array<string|int, mixed>
- Form filters
- $get : array<string|int, mixed>
- GET array
- $headers : array<string|int, mixed>
- Headers
- $parsedData : mixed
- Parsed data
- $patch : array<string|int, mixed>
- PATCH array
- $post : array<string|int, mixed>
- POST array
- $put : array<string|int, mixed>
- PUT array
- $queryData : mixed
- Query data
- $rawData : mixed
- Raw data
- $streamToFile : bool
- Stream to file
- $streamToFileLocation : string
- Stream to file
- __construct() : mixed
- Constructor
- __get() : mixed
- Magic method to get a value from one of the data arrays
- addFilter() : FilterableTrait
- Add filter
- addFilters() : FilterableTrait
- Add filters
- addHeader() : AbstractHttp
- Add a header
- addHeaders() : AbstractHttp
- Add all headers
- clearFilters() : FilterableTrait
- Clear filters
- clearStreamToFile() : Data
- Clear stream to file
- decodeBodyContent() : Body
- Decode the body
- filter() : array<string|int, mixed>
- Filter values
- filterAll() : array<string|int, mixed>
- Filter all values, ignoring excludes
- getBody() : Body
- Get the body
- getBodyContent() : mixed
- Get body content
- getDelete() : string|array<string|int, mixed>
- Get a value from DELETE query data, or the whole array
- getFiles() : string|array<string|int, mixed>
- Get a value from $_FILES, or the whole array
- 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
- getParsedData() : string|array<string|int, mixed>
- Get a value from parsed data, or the whole array
- getPatch() : string|array<string|int, mixed>
- Get a value from PATCH query data, or the whole array
- getPost() : string|array<string|int, mixed>
- Get a value from $_POST, or the whole array
- getPut() : string|array<string|int, mixed>
- Get a value from PUT query data, or the whole array
- getQuery() : string|array<string|int, mixed>
- Get a value from $_GET, or the whole array
- getQueryData() : string|array<string|int, mixed>
- Get a value from query data, or the whole array
- getRawData() : string
- Get the raw data
- getStreamToFileLocation() : string
- Get stream to file location
- hasBody() : bool
- Has a body
- hasBodyContent() : bool
- Has body content
- hasFiles() : bool
- Return whether or not the request has FILES
- hasFilters() : bool
- Has filters
- hasHeader() : bool
- Has a header
- hasHeaders() : bool
- Determine if there are headers
- hasParsedData() : bool
- Has parsed data
- hasQueryData() : bool
- Has query data
- hasRawData() : bool
- Has raw data
- isStreamToFile() : bool
- Is the request stream to file
- prepareStreamToFile() : void
- Prepare stream to file
- processData() : void
- Process any data that came with the request
- processStreamToFile() : Data
- Process stream to file
- removeBody() : AbstractHttp
- Remove the body
- removeHeader() : AbstractHttp
- Remove a header
- removeHeaders() : AbstractHttp
- Remove all headers
- setBody() : AbstractHttp
- Set the body
Properties
$body
Body
    protected
        Body
    $body
     = null
    
    
    
$delete
DELETE array
    protected
        array<string|int, mixed>
    $delete
     = []
    
    
    
$files
FILES array
    protected
        array<string|int, mixed>
    $files
     = []
    
    
    
$filters
Form filters
    protected
        array<string|int, mixed>
    $filters
     = []
    
    
    
$get
GET array
    protected
        array<string|int, mixed>
    $get
     = []
    
    
    
$headers
Headers
    protected
        array<string|int, mixed>
    $headers
     = []
    
    
    
$parsedData
Parsed data
    protected
        mixed
    $parsedData
     = null
    
    
    
$patch
PATCH array
    protected
        array<string|int, mixed>
    $patch
     = []
    
    
    
$post
POST array
    protected
        array<string|int, mixed>
    $post
     = []
    
    
    
$put
PUT array
    protected
        array<string|int, mixed>
    $put
     = []
    
    
    
$queryData
Query data
    protected
        mixed
    $queryData
     = null
    
    
    
$rawData
Raw data
    protected
        mixed
    $rawData
     = null
    
    
    
$streamToFile
Stream to file
    protected
        bool
    $streamToFile
     = false
    
    
    
$streamToFileLocation
Stream to file
    protected
        string
    $streamToFileLocation
     = null
    
    
    
Methods
__construct()
Constructor
    public
                    __construct([string $contentType = null ][, string $encoding = null ][, mixed $filters = null ][, mixed $streamToFile = null ]) : mixed
        Instantiate the request data object
Parameters
- $contentType : string = null
- $encoding : string = null
- $filters : mixed = null
- $streamToFile : mixed = null
Return values
mixed —__get()
Magic method to get a value from one of the data arrays
    public
                    __get(string $name) : mixed
    
        Parameters
- $name : string
Return values
mixed —addFilter()
Add filter
    public
                    addFilter(mixed $filter) : FilterableTrait
    
        Parameters
- $filter : mixed
Tags
Return values
FilterableTrait —addFilters()
Add filters
    public
                    addFilters(array<string|int, mixed> $filters) : FilterableTrait
    
        Parameters
- $filters : array<string|int, mixed>
Return values
FilterableTrait —addHeader()
Add a header
    public
                    addHeader(Header|string $header[, string $value = null ]) : AbstractHttp
    
        Parameters
- $header : Header|string
- $value : string = null
Return values
AbstractHttp —addHeaders()
Add all headers
    public
                    addHeaders(array<string|int, mixed> $headers) : AbstractHttp
    
        Parameters
- $headers : array<string|int, mixed>
Return values
AbstractHttp —clearFilters()
Clear filters
    public
                    clearFilters() : FilterableTrait
    
    
    
        Return values
FilterableTrait —clearStreamToFile()
Clear stream to file
    public
                    clearStreamToFile() : Data
    
    
    
        Return values
Data —decodeBodyContent()
Decode the body
    public
                    decodeBodyContent([string $body = null ]) : Body
    
        Parameters
- $body : string = null
Return values
Body —filter()
Filter values
    public
    abstract                filter(mixed $values) : array<string|int, mixed>
    
        Parameters
- $values : mixed
Return values
array<string|int, 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> —getBody()
Get the body
    public
                    getBody() : Body
    
    
    
        Return values
Body —getBodyContent()
Get body content
    public
                    getBodyContent() : mixed
    
    
    
        Return values
mixed —getDelete()
Get a value from DELETE query data, or the whole array
    public
                    getDelete([string $key = null ]) : string|array<string|int, mixed>
    
        Parameters
- $key : string = null
Return values
string|array<string|int, mixed> —getFiles()
Get a value from $_FILES, or the whole array
    public
                    getFiles([string $key = null ]) : string|array<string|int, mixed>
    
        Parameters
- $key : string = null
Return values
string|array<string|int, 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 —getParsedData()
Get a value from parsed data, or the whole array
    public
                    getParsedData([string $key = null ]) : string|array<string|int, mixed>
    
        Parameters
- $key : string = null
Return values
string|array<string|int, mixed> —getPatch()
Get a value from PATCH query data, or the whole array
    public
                    getPatch([string $key = null ]) : string|array<string|int, mixed>
    
        Parameters
- $key : string = null
Return values
string|array<string|int, mixed> —getPost()
Get a value from $_POST, or the whole array
    public
                    getPost([string $key = null ]) : string|array<string|int, mixed>
    
        Parameters
- $key : string = null
Return values
string|array<string|int, mixed> —getPut()
Get a value from PUT query data, or the whole array
    public
                    getPut([string $key = null ]) : string|array<string|int, mixed>
    
        Parameters
- $key : string = null
Return values
string|array<string|int, mixed> —getQuery()
Get a value from $_GET, or the whole array
    public
                    getQuery([string $key = null ]) : string|array<string|int, mixed>
    
        Parameters
- $key : string = null
Return values
string|array<string|int, mixed> —getQueryData()
Get a value from query data, or the whole array
    public
                    getQueryData([string $key = null ]) : string|array<string|int, mixed>
    
        Parameters
- $key : string = null
Return values
string|array<string|int, mixed> —getRawData()
Get the raw data
    public
                    getRawData() : string
    
    
    
        Return values
string —getStreamToFileLocation()
Get stream to file location
    public
                    getStreamToFileLocation() : string
    
    
    
        Return values
string —hasBody()
Has a body
    public
                    hasBody() : bool
    
    
    
        Return values
bool —hasBodyContent()
Has body content
    public
                    hasBodyContent() : bool
    
    
    
        Return values
bool —hasFiles()
Return whether or not the request has FILES
    public
                    hasFiles() : 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 —hasParsedData()
Has parsed data
    public
                    hasParsedData() : bool
    
    
    
        Return values
bool —hasQueryData()
Has query data
    public
                    hasQueryData() : bool
    
    
    
        Return values
bool —hasRawData()
Has raw data
    public
                    hasRawData() : bool
    
    
    
        Return values
bool —isStreamToFile()
Is the request stream to file
    public
                    isStreamToFile() : bool
    
    
    
        Return values
bool —prepareStreamToFile()
Prepare stream to file
    public
                    prepareStreamToFile(mixed $streamToFile) : void
    
        Parameters
- $streamToFile : mixed
Tags
Return values
void —processData()
Process any data that came with the request
    public
                    processData([string $contentType = null ][, string $encoding = null ][, mixed $streamToFile = null ]) : void
    
        Parameters
- $contentType : string = null
- $encoding : string = null
- $streamToFile : mixed = null
Return values
void —processStreamToFile()
Process stream to file
    public
                    processStreamToFile() : Data
    
    
    
        Return values
Data —removeBody()
Remove the body
    public
                    removeBody() : AbstractHttp
    
    
    
        Return values
AbstractHttp —removeHeader()
Remove a header
    public
                    removeHeader(string $name) : AbstractHttp
    
        Parameters
- $name : string
Return values
AbstractHttp —removeHeaders()
Remove all headers
    public
                    removeHeaders() : AbstractHttp
    
    
    
        Return values
AbstractHttp —setBody()
Set the body
    public
                    setBody(string|Body $body) : AbstractHttp
    
        Parameters
- $body : string|Body