BatchRequestBuilder
extends RequestBuilder
in package
This is the builder to create BatchRequest DTOs.
Tags
Table of Contents
$body | : mixed | |
---|---|---|
$formParams | : mixed | |
$headers | : array<string|int, mixed>|null | |
$method | : string|null | |
$path | : string|null | |
$pathParams | : mixed | |
$urlParams | : mixed | |
body() | Sets the body. | : RequestBuilder |
build() | Returns the created batch request. | : BatchRequest |
formParams() | Sets the form (the ones sent by POST) parameters. | : RequestBuilder |
headers() | Sets the headers. | : RequestBuilder |
method() | Sets the method. | : RequestBuilder |
path() | Sets the path. | : RequestBuilder |
pathParams() | Sets the path parameters. | : RequestBuilder |
requestId() | Sets the requestId. | : BatchRequestBuilder |
urlParams() | Sets the URL (the ones sent by GET) parameters. | : RequestBuilder |
fillRequest() | : Request |
Properties
$body
protected
mixed
$body
= null
$formParams
protected
mixed
$formParams
= null
$headers
protected
array<string|int, mixed>|null
$headers
= null
$method
protected
string|null
$method
= null
$path
protected
string|null
$path
= null
$pathParams
protected
mixed
$pathParams
= null
$urlParams
protected
mixed
$urlParams
= null
Methods
body()
Sets the body.
public
body(mixed $body) : RequestBuilder
Parameters
- $body : mixed
-
An instance of ParametersGroup or an array.
Return values
RequestBuilder —build()
Returns the created batch request.
public
build() : BatchRequest
Return values
BatchRequest —formParams()
Sets the form (the ones sent by POST) parameters.
public
formParams(mixed $formParams) : RequestBuilder
Parameters
- $formParams : mixed
-
An instance of ParametersGroup or an array.
Return values
RequestBuilder —headers()
Sets the headers.
public
headers(array<string|int, mixed> $headers) : RequestBuilder
Parameters
- $headers : array<string|int, mixed>
Return values
RequestBuilder —method()
Sets the method.
public
method(string $method) : RequestBuilder
Parameters
- $method : string
-
Must be a valid method (given in the MethodType enumerate)
Return values
RequestBuilder —path()
Sets the path.
public
path(string $path) : RequestBuilder
Parameters
- $path : string
Return values
RequestBuilder —pathParams()
Sets the path parameters.
public
pathParams(mixed $pathParams) : RequestBuilder
Parameters
- $pathParams : mixed
-
An instance of ParametersGroup or an array.
Return values
RequestBuilder —requestId()
Sets the requestId.
public
requestId(string $requestId) : BatchRequestBuilder
Parameters
- $requestId : string
Return values
BatchRequestBuilder —urlParams()
Sets the URL (the ones sent by GET) parameters.
public
urlParams(mixed $urlParams) : RequestBuilder
Parameters
- $urlParams : mixed
-
An instance of ParametersGroup or an array.
Return values
RequestBuilder —fillRequest()
protected
fillRequest(Request $request) : Request
Parameters
- $request : Request