Documentation

Client implements ClientInterface

Class Client

Table of Contents

$connector ConnectorInterface
$query array
$options array
__construct() Client constructor. mixed
factory() Client factory method for instantiating. static
getVersion() Returns the current version of the library. string
modifyOptions() Allows the library to modify the request prior to making the call to the API. array
request() Takes parameters passed in, makes a request to the API, and processes the response. mixed|StreamInterface
makeRequest() ResponseInterface
processResponse() Processes the returned response from the API. mixed|StreamInterface
getQuery() Get query from Client. array
clearQuery() Clear query. void
addQuery() Add a query parameter to filter results. void
getOptions() Get options from Client. array
clearOptions() Clear options. void
addOption() Add an option to the Guzzle request object. void

Properties

$query

protected array $query = []

$options

protected array $options = []

Methods

getVersion()

Returns the current version of the library.

public getVersion( ) : string
Tags
throws
Return values
string

modifyOptions()

Allows the library to modify the request prior to making the call to the API.

public modifyOptions( [ $options : mixed = [] ] ) : array
Parameters
$options : mixed = []
Return values
array

request()

Takes parameters passed in, makes a request to the API, and processes the response.

public request( $verb : string , $path : string [, $options : array = [] ] ) : mixed|StreamInterface
Parameters
$verb : string
$path : string
$options : array = []
Tags
inheritdoc
Return values
mixed|StreamInterface

makeRequest()

public makeRequest( $verb : string , $path : string [, $options : array = [] ] ) : ResponseInterface
Parameters
$verb : string
$path : string
$options : array = []
Tags
inheritdoc
Return values
ResponseInterface

processResponse()

Processes the returned response from the API.

public processResponse( $response : ResponseInterface ) : mixed|StreamInterface
Parameters
$response : ResponseInterface
Tags
inheritdoc
Return values
mixed|StreamInterface

getQuery()

Get query from Client.

public getQuery( ) : array
Tags
inheritdoc
Return values
array

clearQuery()

Clear query.

public clearQuery( ) : void
Tags
inheritdoc

addQuery()

Add a query parameter to filter results.

public addQuery( $name : mixed , $value : mixed ) : void
Parameters
$name : mixed
$value : mixed
Tags
inheritdoc

getOptions()

Get options from Client.

public getOptions( ) : array
Tags
inheritdoc
Return values
array

clearOptions()

Clear options.

public clearOptions( ) : void
Tags
inheritdoc

addOption()

Add an option to the Guzzle request object.

public addOption( $name : mixed , $value : mixed ) : void
Parameters
$name : mixed
$value : mixed
Tags
inheritdoc

Search results