Documentation

Data
in package
Uses HttpFilterableTrait

HTTP server request data class

Tags
category

Pop

author

Nick Sagona, III dev@nolainteractive.com

copyright

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

license

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

version
5.2.0

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
throws
Exception

__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
Data

filter()

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>|null

getFiles()

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>|null

getParsedData()

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>|null

getPatch()

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>|null

getPost()

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>|null

getPut()

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>|null

getQuery()

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>|null

getQueryData()

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>|null

getRawData()

Get the raw data

public getRawData() : string|null
Return values
string|null

getStreamToFileLocation()

Get stream to file location

public getStreamToFileLocation() : string
Return values
string

hasFiles()

Return whether or not the request has FILES

public hasFiles() : 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
throws
Exception

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
throws
Exception

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
Return values
Data

        
On this page

Search results