Open Journal Systems
3.3.0
|
Public Member Functions | |
__call ($method, $args) | |
enableMagicMethods ($isEnabled) | |
execute ($command) | |
getCommand ($name, array $args=array()) | |
getDescription () | |
getInflector () | |
getIterator ($command, array $commandOptions=null, array $iteratorOptions=array()) | |
setCommandFactory (CommandFactoryInterface $factory) | |
setDescription (ServiceDescriptionInterface $service) | |
setInflector (InflectorInterface $inflector) | |
setResourceIteratorFactory (ResourceIteratorFactoryInterface $factory) | |
![]() | |
__construct ($baseUrl='', $config=null) | |
createRequest ($method='GET', $uri=null, $headers=null, $body=null, array $options=array()) | |
delete ($uri=null, $headers=null, $body=null, array $options=array()) | |
get ($uri=null, $headers=null, $options=array()) | |
getBaseUrl ($expand=true) | |
getConfig ($key=false) | |
getCurlMulti () | |
getDefaultHeaders () | |
getDefaultOption ($keyOrPath) | |
getDefaultUserAgent () | |
head ($uri=null, $headers=null, array $options=array()) | |
options ($uri=null, array $options=array()) | |
patch ($uri=null, $headers=null, $body=null, array $options=array()) | |
post ($uri=null, $headers=null, $postBody=null, array $options=array()) | |
preparePharCacert ($md5Check=true) | |
put ($uri=null, $headers=null, $body=null, array $options=array()) | |
send ($requests) | |
setBaseUrl ($url) | |
setConfig ($config) | |
setCurlMulti (CurlMultiInterface $curlMulti) | |
setDefaultHeaders ($headers) | |
setDefaultOption ($keyOrPath, $value) | |
setRequestFactory (RequestFactoryInterface $factory) | |
setSslVerification ($certificateAuthority=true, $verifyPeer=true, $verifyHost=2) | |
setUriTemplate (UriTemplateInterface $uriTemplate) | |
setUserAgent ($userAgent, $includeDefault=false) | |
![]() | |
addSubscriber (EventSubscriberInterface $subscriber) | |
dispatch ($eventName, array $context=array()) | |
getEventDispatcher () | |
setEventDispatcher (EventDispatcherInterface $eventDispatcher) | |
Static Public Member Functions | |
static | factory ($config=array()) |
static | getAllEvents () |
![]() | |
static | extractPharCacert ($pharCacertPath) |
Data Fields | |
const | COMMAND_PARAMS = 'command.params' |
![]() | |
const | CURL_OPTIONS = 'curl.options' |
const | DEFAULT_SELECT_TIMEOUT = 1.0 |
const | DISABLE_REDIRECTS = RedirectPlugin::DISABLE |
const | MAX_HANDLES = 3 |
const | REQUEST_OPTIONS = 'request.options' |
const | REQUEST_PARAMS = 'request.params' |
const | SSL_CERT_AUTHORITY = 'ssl.certificate_authority' |
![]() | |
const | CREATE_REQUEST = 'client.create_request' |
const | HTTP_DATE = 'D, d M Y H:i:s \G\M\T' |
Protected Member Functions | |
executeMultiple ($commands) | |
getCommandFactory () | |
getResourceIteratorFactory () | |
prepareCommand (CommandInterface $command) | |
![]() | |
expandTemplate ($template, array $variables=null) | |
getUriTemplate () | |
initSsl () | |
prepareRequest (RequestInterface $request, array $options=array()) | |
sendMultiple (array $requests) | |
Protected Attributes | |
$commandFactory | |
$inflector | |
$resourceIteratorFactory | |
$serviceDescription | |
![]() | |
$defaultHeaders | |
$requestFactory | |
$userAgent | |
![]() | |
$eventDispatcher | |
Client object for executing commands on a web service.
Definition at line 25 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
Guzzle\Service\Client::__call | ( | $method, | |
$args | |||
) |
Magic method used to retrieve a command
string | $method | Name of the command object to instantiate |
array | $args | Arguments to pass to the command |
BadMethodCallException | when a command is not found |
Definition at line 86 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Service\Client\getCommand().
Guzzle\Service\Client::enableMagicMethods | ( | $isEnabled | ) |
Definition at line 305 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Common\Version\warn().
Guzzle\Service\Client::execute | ( | $command | ) |
Execute one or more commands
CommandInterface | array | Traversable | $command | Command, array of commands or Traversable object containing commands to execute |
InvalidArgumentException | if an invalid command is passed |
CommandTransferException | if an exception is encountered when transferring multiple commands |
Implements Guzzle\Service\ClientInterface.
Definition at line 145 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Common\AbstractHasDispatcher\dispatch(), Guzzle\Service\Client\executeMultiple(), Guzzle\Service\Client\prepareCommand(), and Guzzle\Http\Client\send().
|
protected |
Execute multiple commands in parallel
array | Traversable | $commands | Array of CommandInterface objects to execute |
Exception |
Definition at line 233 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Common\AbstractHasDispatcher\dispatch(), Guzzle\Service\Exception\CommandTransferException\fromMultiTransferException(), Guzzle\Http\Exception\MultiTransferException\getFailedRequests(), Guzzle\Service\Client\prepareCommand(), and Guzzle\Http\Client\send().
Referenced by Guzzle\Service\Client\execute().
|
static |
Basic factory method to create a new client. Extend this method in subclasses to build more complex clients.
array | Collection | $config | Configuration data |
Implements Guzzle\Common\FromConfigInterface.
Reimplemented in Guzzle\Tests\Service\Mock\MockClient.
Definition at line 60 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
Referenced by Guzzle\Service\Client\getCommand(), Guzzle\Tests\Service\ClientTest\testFactoryCreatesClient(), and Guzzle\Tests\Service\ClientTest\testFactoryDoesNotRequireBaseUrl().
|
static |
Get a list of all of the events emitted from the class
Reimplemented from Guzzle\Http\Client.
Definition at line 65 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
Referenced by Guzzle\Tests\Service\ClientTest\testDescribesEvents().
Guzzle\Service\Client::getCommand | ( | $name, | |
array | $args = array() |
||
) |
Get a command by name. First, the client will see if it has a service description and if the service description defines a command by the supplied name. If no dynamic command is found, the client will look for a concrete command class exists matching the name supplied. If neither are found, an InvalidArgumentException is thrown.
string | $name | Name of the command to retrieve |
array | $args | Arguments to pass to the command |
InvalidArgumentException | if no command can be found by name |
Implements Guzzle\Service\ClientInterface.
Definition at line 91 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Common\AbstractHasDispatcher\dispatch(), Guzzle\Service\Client\factory(), Guzzle\Service\Client\getCommandFactory(), and Guzzle\Http\Client\getConfig().
Referenced by Guzzle\Service\Client\__call(), and Guzzle\Service\Client\getIterator().
|
protected |
Get the command factory associated with the client
Definition at line 292 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Service\Client\$commandFactory, and Guzzle\Service\Command\Factory\CompositeFactory\getDefaultChain().
Referenced by Guzzle\Service\Client\getCommand(), and Guzzle\Service\Client\setDescription().
Guzzle\Service\Client::getDescription | ( | ) |
Get the service description of the client
Implements Guzzle\Service\ClientInterface.
Definition at line 174 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Service\Client\$serviceDescription.
Guzzle\Service\Client::getInflector | ( | ) |
Get the inflector used with the client
Definition at line 198 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Service\Client\$inflector, and Guzzle\Inflection\Inflector\getDefault().
Guzzle\Service\Client::getIterator | ( | $command, | |
array | $commandOptions = null , |
||
array | $iteratorOptions = array() |
||
) |
Get a resource iterator from the client.
string | CommandInterface | $command | Command class or command name. |
array | $commandOptions | Command options used when creating commands. |
array | $iteratorOptions | Iterator options passed to the iterator when it is instantiated. |
Implements Guzzle\Service\ClientInterface.
Definition at line 136 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Service\Client\getCommand(), and Guzzle\Service\Client\getResourceIteratorFactory().
|
protected |
Definition at line 272 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Service\Client\$resourceIteratorFactory.
Referenced by Guzzle\Service\Client\getIterator().
|
protected |
Prepare a command for sending and get the RequestInterface object created by the command
CommandInterface | $command | Command to prepare |
Definition at line 214 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Common\AbstractHasDispatcher\dispatch(), Guzzle\Service\Command\CommandInterface\setClient(), and Guzzle\Http\Message\RequestInterface\STATE_NEW.
Referenced by Guzzle\Service\Client\execute(), and Guzzle\Service\Client\executeMultiple().
Guzzle\Service\Client::setCommandFactory | ( | CommandFactoryInterface | $factory | ) |
Set the command factory used to create commands by name
CommandFactoryInterface | $factory | Command factory |
Definition at line 115 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
Guzzle\Service\Client::setDescription | ( | ServiceDescriptionInterface | $service | ) |
Set the service description of the client
ServiceDescriptionInterface | $service | Service description |
Implements Guzzle\Service\ClientInterface.
Definition at line 158 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Service\Description\ServiceDescriptionInterface\getBaseUrl(), Guzzle\Service\Client\getCommandFactory(), and Guzzle\Http\Client\setBaseUrl().
Guzzle\Service\Client::setInflector | ( | InflectorInterface | $inflector | ) |
Set the inflector used with the client
InflectorInterface | $inflector | Inflection object |
Definition at line 186 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
References Guzzle\Service\Client\$inflector.
Guzzle\Service\Client::setResourceIteratorFactory | ( | ResourceIteratorFactoryInterface | $factory | ) |
Set the resource iterator factory associated with the client
ResourceIteratorFactoryInterface | $factory | Resource iterator factory |
Definition at line 129 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
|
protected |
Definition at line 39 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
Referenced by Guzzle\Service\Client\getCommandFactory().
|
protected |
Inflector associated with the service/client
Definition at line 51 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
Referenced by Guzzle\Service\Client\getInflector(), and Guzzle\Service\Client\setInflector().
|
protected |
Definition at line 45 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
Referenced by Guzzle\Service\Client\getResourceIteratorFactory().
|
protected |
Description of the service and possible commands
Definition at line 33 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
Referenced by Guzzle\Service\Client\getDescription().
const Guzzle\Service\Client::COMMAND_PARAMS = 'command.params' |
Definition at line 27 of file lib/vendor/guzzle/guzzle/src/Guzzle/Service/Client.php.
Referenced by Guzzle\Tests\Service\ClientTest\testAllowsCustomClientParameters(), Guzzle\Tests\Service\ClientTest\testClientAddsGlobalCommandOptions(), and Guzzle\Tests\Service\ClientTest\testMergesDefaultCommandParamsCorrectly().