REQUEST_PARAMS
REQUEST_PARAMS = 'request.params'
Client object for executing commands on a web service.
None found |
None found |
None found |
None found |
None found |
None found |
$defaultHeaders : \Guzzle\Common\Collection
None found |
None found |
$requestFactory : \Guzzle\Http\Message\RequestFactoryInterface
None found |
$eventDispatcher : \Symfony\Component\EventDispatcher\EventDispatcherInterface
None found |
$serviceDescription : \Guzzle\Service\Description\ServiceDescriptionInterface
None found |
$commandFactory : \Guzzle\Service\Command\Factory\FactoryInterface
None found |
$resourceIteratorFactory : \Guzzle\Service\Resource\ResourceIteratorFactoryInterface
None found |
$inflector : \Guzzle\Inflection\InflectorInterface
None found |
$config : \Guzzle\Common\Collection
None found |
$baseUrl : \Guzzle\Http\Url
None found |
$curlMulti : \Guzzle\Http\Curl\CurlMultiInterface
None found |
$uriTemplate : \Guzzle\Parser\UriTemplate\UriTemplateInterface
None found |
getAllEvents() : array
Get a list of all of the events emitted from the class
None found |
__construct(string $baseUrl = '', array|\Guzzle\Common\Collection $config = null)
string | $baseUrl | Base URL of the web service |
array|\Guzzle\Common\Collection | $config | Configuration settings |
if cURL is not installed
None found |
setConfig(array|\Guzzle\Common\Collection $config) : self
Set the configuration object to use with the client
array|\Guzzle\Common\Collection | $config | Parameters that define how the client behaves |
None found |
getConfig(boolean|string $key = false) : mixed|\Guzzle\Common\Collection
Get a configuration setting or all of the configuration settings. The Collection result of this method can be modified to change the configuration settings of a client.
A client should honor the following special values:
boolean|string | $key | Configuration value to retrieve. Set to FALSE to retrieve all values of the client. The object return can be modified, and modifications will affect the client's config. |
None found |
setDefaultOption(string $keyOrPath, mixed $value) : $this
Set a default request option on the client that will be used as a default for each request
string | $keyOrPath | request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo) |
mixed | $value | Value to set |
None found |
getDefaultOption(string $keyOrPath) : mixed|null
Retrieve a default request option from the client
string | $keyOrPath | request.options key (e.g. allow_redirects) or path to a nested key (e.g. headers/foo) |
None found |
setSslVerification(string|boolean $certificateAuthority = true, boolean $verifyPeer = true, integer $verifyHost = 2) : self
Set SSL verification options.
Setting $certificateAuthority to TRUE will result in the bundled cacert.pem being used to verify against the remote host.
Alternate certificates to verify against can be specified with the $certificateAuthority option set to the full path to a certificate file, or the path to a directory containing certificates.
Setting $certificateAuthority to FALSE will turn off peer verification, unset the bundled cacert.pem, and disable host verification. Please don't do this unless you really know what you're doing, and why you're doing it.
string|boolean | $certificateAuthority | bool, file path, or directory path |
boolean | $verifyPeer | FALSE to stop from verifying the peer's certificate. |
integer | $verifyHost | Set to 1 to check the existence of a common name in the SSL peer certificate. 2 to check the existence of a common name and also verify that it matches the hostname provided. |
None found |
createRequest(string $method = 'GET', string|array $uri = null, array|\Guzzle\Common\Collection $headers = null, string|resource|array|\Guzzle\Http\EntityBodyInterface $body = null, array $options = array()) : \Guzzle\Http\Message\RequestInterface
Create and return a new {@see RequestInterface} configured for the client.
Use an absolute path to override the base path of the client, or a relative path to append to the base path of the client. The URI can contain the query string as well. Use an array to provide a URI template and additional variables to use in the URI template expansion.
string | $method | HTTP method. Defaults to GET |
string|array | $uri | Resource URI. |
array|\Guzzle\Common\Collection | $headers | HTTP headers |
string|resource|array|\Guzzle\Http\EntityBodyInterface | $body | Entity body of request (POST/PUT) or response (GET) |
array | $options | Array of options to apply to the request |
None found |
getBaseUrl(boolean $expand = true) : string|null
Get the client's base URL as either an expanded or raw URI template
boolean | $expand | Set to FALSE to get the raw base URL without URI template expansion |
None found |
setBaseUrl(string $url) : self
Set the base URL of the client
string | $url | The base service endpoint URL of the webservice |
None found |
setUserAgent(string $userAgent, boolean $includeDefault = false) : self
Set the User-Agent header to be used on all requests from the client
string | $userAgent | User agent string |
boolean | $includeDefault | Set to true to prepend the value to Guzzle's default user agent string |
None found |
getDefaultUserAgent() : string
Get the default User-Agent string to use with Guzzle
None found |
get(string|array $uri = null, array|\Guzzle\Common\Collection $headers = null, array $options = array()) : \Guzzle\Http\Message\RequestInterface
Create a GET request for the client
string|array | $uri | Resource URI |
array|\Guzzle\Common\Collection | $headers | HTTP headers |
array | $options | Options to apply to the request. For BC compatibility, you can also pass a string to tell Guzzle to download the body of the response to a particular location. Use the 'body' option instead for forward compatibility. |
None found |
head(string|array $uri = null, array|\Guzzle\Common\Collection $headers = null, array $options = array()) : \Guzzle\Http\Message\RequestInterface
Create a HEAD request for the client
string|array | $uri | Resource URI |
array|\Guzzle\Common\Collection | $headers | HTTP headers |
array | $options | Options to apply to the request |
None found |
delete(string|array $uri = null, array|\Guzzle\Common\Collection $headers = null, string|resource|\Guzzle\Http\EntityBodyInterface $body = null, array $options = array()) : \Guzzle\Http\Message\EntityEnclosingRequestInterface
Create a DELETE request for the client
string|array | $uri | Resource URI |
array|\Guzzle\Common\Collection | $headers | HTTP headers |
string|resource|\Guzzle\Http\EntityBodyInterface | $body | Body to send in the request |
array | $options | Options to apply to the request |
None found |
put(string|array $uri = null, array|\Guzzle\Common\Collection $headers = null, string|resource|\Guzzle\Http\EntityBodyInterface $body = null, array $options = array()) : \Guzzle\Http\Message\EntityEnclosingRequestInterface
Create a PUT request for the client
string|array | $uri | Resource URI |
array|\Guzzle\Common\Collection | $headers | HTTP headers |
string|resource|\Guzzle\Http\EntityBodyInterface | $body | Body to send in the request |
array | $options | Options to apply to the request |
None found |
patch(string|array $uri = null, array|\Guzzle\Common\Collection $headers = null, string|resource|\Guzzle\Http\EntityBodyInterface $body = null, array $options = array()) : \Guzzle\Http\Message\EntityEnclosingRequestInterface
Create a PATCH request for the client
string|array | $uri | Resource URI |
array|\Guzzle\Common\Collection | $headers | HTTP headers |
string|resource|\Guzzle\Http\EntityBodyInterface | $body | Body to send in the request |
array | $options | Options to apply to the request |
None found |
post(string|array $uri = null, array|\Guzzle\Common\Collection $headers = null, array|\Guzzle\Common\Collection|string|\Guzzle\Http\EntityBodyInterface $postBody = null, array $options = array()) : \Guzzle\Http\Message\EntityEnclosingRequestInterface
Create a POST request for the client
string|array | $uri | Resource URI |
array|\Guzzle\Common\Collection | $headers | HTTP headers |
array|\Guzzle\Common\Collection|string|\Guzzle\Http\EntityBodyInterface | $postBody | POST body. Can be a string, EntityBody, or associative array of POST fields to send in the body of the request. Prefix a value in the array with the @ symbol to reference a file. |
array | $options | Options to apply to the request |
None found |
options(string|array $uri = null, array $options = array()) : \Guzzle\Http\Message\RequestInterface
Create an OPTIONS request for the client
string|array | $uri | Resource URI |
array | $options | Options to apply to the request |
None found |
send(array|\Guzzle\Http\Message\RequestInterface $requests) : \Guzzle\Http\Message\Response|array
Sends a single request or an array of requests in parallel
array|\Guzzle\Http\Message\RequestInterface | $requests | One or more RequestInterface objects to send |
Returns a single Response or an array of Response objects
None found |
setCurlMulti(\Guzzle\Http\Curl\CurlMultiInterface $curlMulti) : self
Set a curl multi object to be used internally by the client for transferring requests.
\Guzzle\Http\Curl\CurlMultiInterface | $curlMulti | Multi object |
None found |
getCurlMulti() : \Guzzle\Http\Curl\CurlMultiInterface|\Guzzle\Http\Curl\CurlMultiProxy
None found |
setRequestFactory(\Guzzle\Http\Message\RequestFactoryInterface $factory)
\Guzzle\Http\Message\RequestFactoryInterface | $factory |
None found |
setUriTemplate(\Guzzle\Parser\UriTemplate\UriTemplateInterface $uriTemplate) : self
Set the URI template expander to use with the client
\Guzzle\Parser\UriTemplate\UriTemplateInterface | $uriTemplate | URI template expander |
None found |
None found |
None found |
None found |
extractPharCacert(string $pharCacertPath) : string
Copies the phar cacert from a phar into the temp directory.
string | $pharCacertPath | Path to the phar cacert. For example: 'phar://aws.phar/Guzzle/Http/Resources/cacert.pem' |
Throws if the phar cacert cannot be found or the file cannot be copied to the temp dir.
Returns the path to the extracted cacert file.
None found |
setEventDispatcher(\Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher) : self
Set the EventDispatcher of the request
\Symfony\Component\EventDispatcher\EventDispatcherInterface | $eventDispatcher |
None found |
getEventDispatcher() : \Symfony\Component\EventDispatcher\EventDispatcherInterface
Get the EventDispatcher of the request
None found |
dispatch(string $eventName, array $context = array()) : \Guzzle\Common\Event
Helper to dispatch Guzzle events and set the event name on the event
string | $eventName | Name of the event to dispatch |
array | $context | Context of the event |
Returns the created event object
None found |
addSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber) : self
Add an event subscriber to the dispatcher
\Symfony\Component\EventDispatcher\EventSubscriberInterface | $subscriber | Event subscriber |
None found |
factory(array|\Guzzle\Common\Collection $config = array()) : \Guzzle\Service\Client
Basic factory method to create a new client. Extend this method in subclasses to build more complex clients.
array|\Guzzle\Common\Collection | $config | Configuration data |
None found |
__call(string $method, array $args) : mixed
Magic method used to retrieve a command
string | $method | Name of the command object to instantiate |
array | $args | Arguments to pass to the command |
when a command is not found
Returns the result of the command
None found |
getCommand(string $name, array $args = array()) : \Guzzle\Service\Command\CommandInterface
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 |
None found |
setCommandFactory(\Guzzle\Service\Command\Factory\FactoryInterface $factory) : self
Set the command factory used to create commands by name
\Guzzle\Service\Command\Factory\FactoryInterface | $factory | Command factory |
None found |
setResourceIteratorFactory(\Guzzle\Service\Resource\ResourceIteratorFactoryInterface $factory) : self
Set the resource iterator factory associated with the client
\Guzzle\Service\Resource\ResourceIteratorFactoryInterface | $factory | Resource iterator factory |
None found |
getIterator(string|\Guzzle\Service\Command\CommandInterface $command, array $commandOptions = null, array $iteratorOptions = array()) : \Guzzle\Service\Resource\ResourceIteratorInterface
Get a resource iterator from the client.
string|\Guzzle\Service\Command\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. |
None found |
execute(\Guzzle\Service\Command\CommandInterface|array|\Guzzle\Service\Traversable $command) : mixed
Execute one or more commands
\Guzzle\Service\Command\CommandInterface|array|\Guzzle\Service\Traversable | $command | Command, array of commands or Traversable object containing commands to execute |
Returns the result of the executed command or an array of commands if executing multiple commands
None found |
setDescription(\Guzzle\Service\Description\ServiceDescriptionInterface $service) : \Guzzle\Service\ClientInterface
Set the service description of the client
\Guzzle\Service\Description\ServiceDescriptionInterface | $service | Service description |
None found |
getDescription() : \Guzzle\Service\Description\ServiceDescriptionInterface|null
Get the service description of the client
None found |
setInflector(\Guzzle\Inflection\InflectorInterface $inflector) : self
Set the inflector used with the client
\Guzzle\Inflection\InflectorInterface | $inflector | Inflection object |
None found |
None found |
codeCoverageIgnore |
---|
expandTemplate(string $template, array $variables = null) : string
Expand a URI template while merging client config settings into the template variables
string | $template | Template to expand |
array | $variables | Variables to inject |
None found |
getUriTemplate() : \Guzzle\Parser\UriTemplate\UriTemplateInterface
Get the URI template expander used by the client
None found |
sendMultiple(array $requests) : array
Send multiple requests in parallel
array | $requests | Array of RequestInterface objects |
Returns an array of Response objects
None found |
prepareRequest(\Guzzle\Http\Message\RequestInterface $request, array $options = array()) : \Guzzle\Http\Message\RequestInterface
Prepare a request to be sent from the Client by adding client specific behaviors and properties to the request.
\Guzzle\Http\Message\RequestInterface | $request | Request to prepare for the client |
array | $options | Options to apply to the request |
None found |
None found |
prepareCommand(\Guzzle\Service\Command\CommandInterface $command) : \Guzzle\Http\Message\RequestInterface
Prepare a command for sending and get the RequestInterface object created by the command
\Guzzle\Service\Command\CommandInterface | $command | Command to prepare |
None found |
executeMultiple(array|\Guzzle\Service\Traversable $commands) : array
Execute multiple commands in parallel
array|\Guzzle\Service\Traversable | $commands | Array of CommandInterface objects to execute |
Returns an array of the executed commands
None found |
None found |
getCommandFactory() : \Guzzle\Service\Command\Factory\FactoryInterface
Get the command factory associated with the client
None found |