class RequestBuilder (View source)

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

Traits

Provides basic array helper methods.
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

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

Parameters

string|UriInterface $uri
array $query

Return Value

UriInterface

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

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

__construct(string $baseUri, string $restConfigPath)

Parameters

string $baseUri
string $restConfigPath

Exceptions

ValidationException

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

Parameters

string $path
Message $message
array $headers

Return Value

RequestInterface

Exceptions

ValidationException