Documentation

Request extends HttpEntity

An entity which represents the request handled

Table of Contents

$body  : array<string|int, mixed>
Contains the POST and PUT request data
$method  : string
Contains the request method
$params  : array<string|int, mixed>
Contains the data which was in the request uri
$query  : array<string|int, mixed>
Contains the GET request data
$uri  : string
Contains the uri of the request
$headers  : array<string|int, mixed>
The list of headers
__construct()  : mixed
addHeader()  : void
Add a new header
empty()  : Entity
Create an empty Entity
getHeaders()  : array<string|int, mixed>
Get all the headers

Properties

$body

Contains the POST and PUT request data

public array<string|int, mixed> $body

$method

Contains the request method

public string $method

$params

Contains the data which was in the request uri

public array<string|int, mixed> $params

$query

Contains the GET request data

public array<string|int, mixed> $query

$uri

Contains the uri of the request

public string $uri

$headers

The list of headers

protected array<string|int, mixed> $headers

Methods

__construct()

public __construct(string $uri, string $method[, array<string|int, mixed> $params = [] ][, array<string|int, mixed> $body = [] ][, array<string|int, mixed> $query = [] ]) : mixed
Parameters
$uri : string
$method : string
$params : array<string|int, mixed> = []
$body : array<string|int, mixed> = []
$query : array<string|int, mixed> = []
Return values
mixed

addHeader()

Add a new header

public addHeader(Header $header) : void
Parameters
$header : Header

the header to add

Return values
void

getHeaders()

Get all the headers

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

Array of Headers

Search results