BatchRequest extends Request
in package

This is the Batch Request class.

The batch requests to make petitions by HTTP(s) will be prepared throught that class.

Tags
see
BatchRequest::getName()
see
Request

Table of Contents

$body  : array<string|int, mixed>
$formParams  : array<string|int, mixed>
$headers  : array<string|int, mixed>
$method  : string
$path  : string
$pathParams  : array<string|int, mixed>
$urlParams  : array<string|int, mixed>
getBody() Returns the request body.  : array<string|int, mixed>
getFormParams() Returns the request form parameters.  : array<string|int, mixed>
getFullPath() Returns the request path with the pathParams replaced.  : string
getHeaders() Returns the request headers.  : array<string|int, mixed>
getMethod() Returns the request method.  : string
getPath() Returns the request path.  : string
getPathParams() Returns the request path parameters.  : array<string|int, mixed>
getRequestId() Returns the batch request request id.  : string
getUrlParams() Returns the request URL parameters.  : array<string|int, mixed>
setBody() Sets the request body.  : void
setFormParams() Sets the request form (the ones sent by POST) parameters.  : void
setHeaders() Sets the request headers.  : void
setMethod() Not allowed to modify method for Batch Requests. Do nothing.  : void
setPath() Sets the request path.  : void
setPathParams() Sets the request path parameters.  : void
setRequestId() Sets the batch request request id.  : void
setUrlParams() Sets the request URL (the ones sent by GET) parameters.  : void
toArray()  : array<string|int, mixed>

Properties

$body

protected array<string|int, mixed> $body = []

$formParams

protected array<string|int, mixed> $formParams = []

$headers

protected array<string|int, mixed> $headers = []

$method

protected string $method = \SDK\Core\Enums\MethodType::GET

$pathParams

protected array<string|int, mixed> $pathParams = []

$urlParams

protected array<string|int, mixed> $urlParams = []

Methods

getBody()

Returns the request body.

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

getFormParams()

Returns the request form parameters.

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

getFullPath()

Returns the request path with the pathParams replaced.

public getFullPath() : string
Return values
string

getHeaders()

Returns the request headers.

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

getMethod()

Returns the request method.

public getMethod() : string
Return values
string

getPath()

Returns the request path.

public getPath() : string
Return values
string

getPathParams()

Returns the request path parameters.

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

getRequestId()

Returns the batch request request id.

public getRequestId() : string
Return values
string

getUrlParams()

Returns the request URL parameters.

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

setBody()

Sets the request body.

public setBody(mixed $body) : void
Parameters
$body : mixed

An instance of ParametersGroup or an array. Something else will throw an exception.

Tags
throws
RequestException
Return values
void

setFormParams()

Sets the request form (the ones sent by POST) parameters.

public setFormParams(mixed $formParams) : void
Parameters
$formParams : mixed

An instance of ParametersGroup or an array. Something else will throw an exception.

Tags
throws
RequestException
Return values
void

setHeaders()

Sets the request headers.

public setHeaders(array<string|int, mixed> $headers) : void
Parameters
$headers : array<string|int, mixed>
Return values
void

setMethod()

Not allowed to modify method for Batch Requests. Do nothing.

public setMethod(string $method) : void
Parameters
$method : string
Return values
void

setPath()

Sets the request path.

public setPath(string $path) : void
Parameters
$path : string
Return values
void

setPathParams()

Sets the request path parameters.

public setPathParams(mixed $pathParams) : void
Parameters
$pathParams : mixed

An instance of ParametersGroup or an array. Something else will throw an exception.

Tags
throws
RequestException
Return values
void

setRequestId()

Sets the batch request request id.

public setRequestId(string $requestId) : void
Parameters
$requestId : string
Return values
void

setUrlParams()

Sets the request URL (the ones sent by GET) parameters.

public setUrlParams(mixed $urlParams) : void
Parameters
$urlParams : mixed

An instance of ParametersGroup or an array. Something else will throw an exception.

Tags
throws
RequestException
Return values
void

toArray()

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

Search results