Client
in
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
$connector
protected
ConnectorInterface
$connector
$query
protected
array
$query
= []
$options
protected
array
$options
= []
Methods
__construct()
Client constructor.
public
__construct(
$connector :
ConnectorInterface
)
: mixed
Parameters
- $connector : ConnectorInterface
Return values
mixedfactory()
Client factory method for instantiating.
public
static factory(
$connector :
ConnectorInterface
)
: static
Parameters
- $connector : ConnectorInterface
Return values
staticgetVersion()
Returns the current version of the library.
public
getVersion(
)
: string
Tags
Return values
stringmodifyOptions()
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
arrayrequest()
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
Return values
mixed|StreamInterfacemakeRequest()
public
makeRequest(
$verb :
string
, $path :
string
[, $options :
array
= [] ]
)
: ResponseInterface
Parameters
- $verb : string
- $path : string
- $options : array = []
Tags
Return values
ResponseInterfaceprocessResponse()
Processes the returned response from the API.
public
processResponse(
$response :
ResponseInterface
)
: mixed|StreamInterface
Parameters
- $response : ResponseInterface
Tags
Return values
mixed|StreamInterfacegetQuery()
Get query from Client.
public
getQuery(
)
: array
Tags
Return values
arrayclearQuery()
Clear query.
public
clearQuery(
)
: void
Tags
addQuery()
Add a query parameter to filter results.
public
addQuery(
$name :
mixed
, $value :
mixed
)
: void
Parameters
- $name : mixed
- $value : mixed
Tags
getOptions()
Get options from Client.
public
getOptions(
)
: array
Tags
Return values
arrayclearOptions()
Clear options.
public
clearOptions(
)
: void
Tags
addOption()
Add an option to the Guzzle request object.
public
addOption(
$name :
mixed
, $value :
mixed
)
: void
Parameters
- $name : mixed
- $value : mixed