class RequestBuilder

Builds a PSR-7 request from a set of request information.

Traits

Provides a light wrapper around often used URI related functions.

Methods

UriInterface
buildUriWithQuery(string|UriInterface $uri, array $query)

No description

from UriTrait
static array
validate(array $arr, array $requiredKeys)

No description

static array
validateNotNull(array $arr, array $requiredKeys)

No description

__construct(string $baseUri, string $restConfigPath)

No description

RequestInterface
build(string $path, Message $message, array $headers = [])

No description

Details

in UriTrait at line 48
UriInterface buildUriWithQuery(string|UriInterface $uri, array $query)

Parameters

string|UriInterface $uri
array $query

Return Value

UriInterface

in ValidationTrait at line 41
static array validate(array $arr, array $requiredKeys)

Parameters

array $arr Associative array
array $requiredKeys List of keys to check for in $arr

Return Value

array Returns $arr for fluent use

in ValidationTrait at line 51
static array validateNotNull(array $arr, array $requiredKeys)

Parameters

array $arr Associative array
array $requiredKeys List of keys to check for in $arr

Return Value

array Returns $arr for fluent use

at line 59
__construct(string $baseUri, string $restConfigPath)

Parameters

string $baseUri
string $restConfigPath

Exceptions

ValidationException

at line 73
RequestInterface build(string $path, Message $message, array $headers = [])

Parameters

string $path
Message $message
array $headers

Return Value

RequestInterface

Exceptions

ValidationException