ApiRequest
extends Request
in package
implements
IApiRequest
FinalYes
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
- $api_key : IApiKey
- $hashCode : int
- $hashCounter : int
Methods
- __call() : mixed
- __callStatic() : mixed
- __construct() : mixed
- __destruct() : mixed
- __get() : mixed
- extends() : bool
- getApiKey() : string|null
- Gets the API key that was sent along with this request as the header X_API_KEY
- 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
- isExternal() : bool
- isInternal() : bool
- setBody() : mixed
- setHeader() : 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
$api_key
private
IApiKey
$api_key
$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>
__construct()
public
__construct() : 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
boolgetApiKey()
Gets the API key that was sent along with this request as the header X_API_KEY
public
getApiKey() : string|null
Tags
Return values
string|null —The API key if it was sent with this request, null otherwise
getBody()
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
boolisExternal()
public
isExternal() : bool
Tags
Return values
boolisInternal()
public
isInternal() : bool
Tags
Return values
boolsetBody()
public
setBody(string $body) : mixed
Parameters
- $body : string
setHeader()
public
setHeader(string $name, string $value) : mixed
Parameters
- $name : string
- $value : string
init()
{@inheritdoc}
protected
init() : mixed
Tags
setMethod()
private
setMethod(string $method) : mixed
Parameters
- $method : string
setUri()
private
setUri(IUri $uri) : mixed
Parameters
- $uri : IUri