class RequestBuilder (View source)

internal  
 

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

bool
pathExists(string $path)

No description

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

No description

Details

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

No description

Parameters

string|UriInterface $uri
array $query

Return Value

UriInterface

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

No description

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)

No description

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)

No description

Parameters

string $baseUri
string $restConfigPath

Exceptions

ValidationException

bool pathExists(string $path)

No description

Parameters

string $path

Return Value

bool

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

No description

Parameters

string $path
Message $message
array $headers

Return Value

RequestInterface

Exceptions

ValidationException