PHP Trait Zendesk\API\Traits\Utility\ChainedParametersTrait
An example would be a call
$client->ticket(2)->comments(3)->author(); would create an Author object with
chained parameters (An Array):
[
'Zendesk\API\Tickets' => 2,
'Zendesk\API\Comments' => 3
]
Show file
Open project: zendesk/zendesk_api_client_php
Protected Properties
Public Methods
Method Details
addChainedParametersToParams()
public method
A helper method to add the chained parameters to the existing parameters.
public addChainedParametersToParams ( array $params, array $map ) : array |
$params |
array |
The existing parameters |
$map |
array |
An array describing what parameter key corresponds to which classId
e.g. ['ticket_id' => 'Zendesk\API\Ticket']
normal usage would be ['id' => $this::class] |
return |
array |
|
getChainedParameter()
public method
Returns the named chained parameter
getChainedParameters()
public method
Returns chained parameters
getLatestChainedParameter()
public method
Returns the named chained parameter
setChainedParameters()
public method
Sets the chained parameters
Property Details
$chainedParameters protected property
protected array $chainedParameters |
return |
array |
|