Request
extends Message
in package
implements
ISingleton, IRequest
Uses
TSingleton, TRequest
Tags
Table of Contents
Interfaces
Properties
- $body : string|null
- The body of the message. String if it has been set, null otherwise
- $headers : array<string|int, mixed>
- $instance : ISingleton
- $method : string
- $params : stdClass
- $uri : IUri
- $hashCode : int
- $hashCounter : int
Methods
- __call() : mixed
- __callStatic() : mixed
- __destruct() : mixed
- __get() : mixed
- extends() : bool
- getBody() : string
- getHeader() : string|null
- Gets a particular header value by a provided header name
- getHeaders() : array<string|int, mixed>
- getHttpHost() : string
- getInstance() : ISingleton
- getMethod() : string
- Retrieves the HTTP method of the request.
- getParameter() : mixed
- getParameters() : array<string|int, mixed>
- getReflection() : ReflectionClass
- getScheme() : string
- getUri() : string
- Retrieves the URI of the request.
- is() : bool
- setBody() : mixed
- setHeader() : mixed
- __construct() : mixed
- init() : mixed
- {@inheritdoc}
- setMethod() : mixed
- setUri() : mixed
Properties
$body
The body of the message. String if it has been set, null otherwise
protected
string|null
$body
= ''
$headers
protected
array<string|int, mixed>
$headers
= []
$instance
protected
static ISingleton
$instance
$method
protected
string
$method
$params
protected
stdClass
$params
$uri
protected
IUri
$uri
$hashCode
private
int
$hashCode
$hashCounter
private
static int
$hashCounter
= 0
Methods
__call()
public
__call(string $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : string
- $arguments : array<string|int, mixed>
Tags
__callStatic()
public
static __callStatic(mixed $method, array<string|int, mixed> $arguments) : mixed
Parameters
- $method : mixed
- $arguments : array<string|int, mixed>
__destruct()
public
__destruct() : mixed
__get()
public
__get(string $property) : mixed
Parameters
- $property : string
extends()
public
extends(ReflectionClass $reflector) : bool
Parameters
- $reflector : ReflectionClass
Return values
boolgetBody()
public
getBody() : string
Return values
stringgetHeader()
Gets a particular header value by a provided header name
public
getHeader(string $header) : string|null
Parameters
- $header : string
Return values
string|nullgetHeaders()
public
getHeaders() : array<string|int, mixed>
Return values
array<string|int, mixed>getHttpHost()
public
getHttpHost() : string
Return values
stringgetInstance()
public
static getInstance() : ISingleton
Return values
ISingletongetMethod()
Retrieves the HTTP method of the request.
public
getMethod() : string
Tags
Return values
stringgetParameter()
public
getParameter(string $parameter[, mixed $default = null ]) : mixed
Parameters
- $parameter : string
- $default : mixed = null
getParameters()
public
getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>getReflection()
public
getReflection() : ReflectionClass
Return values
ReflectionClassgetScheme()
public
getScheme() : string
Return values
stringgetUri()
Retrieves the URI of the request.
public
getUri() : string
Tags
Return values
stringis()
public
is(string $what) : bool
Parameters
- $what : string
Return values
boolsetBody()
public
setBody(string $body) : mixed
Parameters
- $body : string
setHeader()
public
setHeader(string $name, string $value) : mixed
Parameters
- $name : string
- $value : string
__construct()
protected
final __construct() : mixed
init()
{@inheritdoc}
protected
init() : mixed
Tags
setMethod()
private
setMethod(string $method) : mixed
Parameters
- $method : string
setUri()
private
setUri(IUri $uri) : mixed
Parameters
- $uri : IUri