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

  • internal
CloneableInstantiable
Methods
public __construct( $baseUri, $restConfigPath)
public build( $path, Google\Protobuf\Internal\Message $message, array $headers = [])
 


public buildUriWithQuery( $uri, array $query)
 


  • return UriInterface
public static validate( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
public static validateNotNull( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
Properties
private $baseUri
private $restConfig
Methods
private arrayFilterRemoveNull(array $arr)
 
Just like array_filter(), but preserves falsey values except null.

  • return array
private buildBindings(array $placeholders, Google\Protobuf\Internal\Message $message)
 


  • return array Bindings from path template fields to values from message
private buildUri( $path, $queryParams)
 


  • return UriInterface
private constructBodyAndQueryParameters(Google\Protobuf\Internal\Message $message, $config)
 


  • return array Tuple [$body, $queryParams]
private getConfigsForUriTemplates( $config)
 
Create a list of all possible configs using the additionalBindings

  • return array[] An array of configs
private isAssoc(array $arr)
 
Determine whether given array is associative.

  • return bool
private pluck( $key, array $arr, $isRequired = true)
 
Pluck a value out of an array.

  • return mixed|null
  • throws InvalidArgumentException
private pluckArray(array $keys, $arr)
 
Pluck a subset of an array.

  • return array
private subsetArray(array $keys, $arr)
 
Return a subset of an array, like pluckArray, without modifying the original array.

  • return array
private tryRenderPathTemplate( $uriTemplate, array $bindings)
 
Try to render the resource name. The rendered resource name will always contain a leading '/'

private static validateFileExists( $filePath)
private static validateImpl( $arr, $requiredKeys, $allowNull)
Methods
public static validate( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
private static validateFileExists( $filePath)
private static validateImpl( $arr, $requiredKeys, $allowNull)
public static validateNotNull( $arr, $requiredKeys)
 


  • return array Returns $arr for fluent use
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only