Data
in package
Uses
HttpFilterableTrait
HTTP server request data class
Tags
Table of Contents
Properties
- $delete : array<string|int, mixed>
- DELETE array
- $files : array<string|int, mixed>
- FILES array
- $get : array<string|int, mixed>
- GET array
- $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|null
- Stream to file
Methods
- __construct() : mixed
- Constructor
- __get() : mixed
- Magic method to get a value from one of the data arrays
- clearStreamToFile() : Data
- Clear stream to file
- filter() : mixed
- Filter values
- getDelete() : string|array<string|int, mixed>|null
- Get a value from DELETE query data, or the whole array
- getFiles() : string|array<string|int, mixed>|null
- Get a value from $_FILES, or the whole array
- getParsedData() : string|array<string|int, mixed>|null
- Get a value from parsed data, or the whole array
- getPatch() : string|array<string|int, mixed>|null
- Get a value from PATCH query data, or the whole array
- getPost() : string|array<string|int, mixed>|null
- Get a value from $_POST, or the whole array
- getPut() : string|array<string|int, mixed>|null
- Get a value from PUT query data, or the whole array
- getQuery() : string|array<string|int, mixed>|null
- Get a value from $_GET, or the whole array
- getQueryData() : string|array<string|int, mixed>|null
- Get a value from query data, or the whole array
- getRawData() : string|null
- Get the raw data
- getStreamToFileLocation() : string
- Get stream to file location
- hasFiles() : bool
- Return whether or not the request has FILES
- 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
Properties
$delete
DELETE array
protected
array<string|int, mixed>
$delete
= []
$files
FILES array
protected
array<string|int, mixed>
$files
= []
$get
GET array
protected
array<string|int, mixed>
$get
= []
$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|null
$streamToFileLocation
= null
Methods
__construct()
Constructor
public
__construct([string|null $contentType = null ][, string|null $encoding = null ][, mixed $filters = null ][, mixed $streamToFile = null ]) : mixed
Instantiate the request data object
Parameters
- $contentType : string|null = null
- $encoding : string|null = null
- $filters : mixed = null
- $streamToFile : mixed = null
Tags
__get()
Magic method to get a value from one of the data arrays
public
__get(string $name) : mixed
Parameters
- $name : string
clearStreamToFile()
Clear stream to file
public
clearStreamToFile() : Data
Return values
Datafilter()
Filter values
public
filter(mixed $values) : mixed
Parameters
- $values : mixed
getDelete()
Get a value from DELETE query data, or the whole array
public
getDelete([string|null $key = null ]) : string|array<string|int, mixed>|null
Parameters
- $key : string|null = null
Return values
string|array<string|int, mixed>|nullgetFiles()
Get a value from $_FILES, or the whole array
public
getFiles([string|null $key = null ]) : string|array<string|int, mixed>|null
Parameters
- $key : string|null = null
Return values
string|array<string|int, mixed>|nullgetParsedData()
Get a value from parsed data, or the whole array
public
getParsedData([string|null $key = null ]) : string|array<string|int, mixed>|null
Parameters
- $key : string|null = null
Return values
string|array<string|int, mixed>|nullgetPatch()
Get a value from PATCH query data, or the whole array
public
getPatch([string|null $key = null ]) : string|array<string|int, mixed>|null
Parameters
- $key : string|null = null
Return values
string|array<string|int, mixed>|nullgetPost()
Get a value from $_POST, or the whole array
public
getPost([string|null $key = null ]) : string|array<string|int, mixed>|null
Parameters
- $key : string|null = null
Return values
string|array<string|int, mixed>|nullgetPut()
Get a value from PUT query data, or the whole array
public
getPut([string|null $key = null ]) : string|array<string|int, mixed>|null
Parameters
- $key : string|null = null
Return values
string|array<string|int, mixed>|nullgetQuery()
Get a value from $_GET, or the whole array
public
getQuery([string|null $key = null ]) : string|array<string|int, mixed>|null
Parameters
- $key : string|null = null
Return values
string|array<string|int, mixed>|nullgetQueryData()
Get a value from query data, or the whole array
public
getQueryData([string|null $key = null ]) : string|array<string|int, mixed>|null
Parameters
- $key : string|null = null
Return values
string|array<string|int, mixed>|nullgetRawData()
Get the raw data
public
getRawData() : string|null
Return values
string|nullgetStreamToFileLocation()
Get stream to file location
public
getStreamToFileLocation() : string
Return values
stringhasFiles()
Return whether or not the request has FILES
public
hasFiles() : bool
Return values
boolhasParsedData()
Has parsed data
public
hasParsedData() : bool
Return values
boolhasQueryData()
Has query data
public
hasQueryData() : bool
Return values
boolhasRawData()
Has raw data
public
hasRawData() : bool
Return values
boolisStreamToFile()
Is the request stream to file
public
isStreamToFile() : bool
Return values
boolprepareStreamToFile()
Prepare stream to file
public
prepareStreamToFile(mixed $streamToFile) : void
Parameters
- $streamToFile : mixed
Tags
processData()
Process any data that came with the request
public
processData([string|null $contentType = null ][, string|null $encoding = null ][, mixed $streamToFile = null ]) : void
Parameters
- $contentType : string|null = null
- $encoding : string|null = null
- $streamToFile : mixed = null
Tags
processStreamToFile()
Process stream to file
public
processStreamToFile([string|null $contentType = null ][, string|null $contentEncoding = null ]) : Data
Parameters
- $contentType : string|null = null
- $contentEncoding : string|null = null