DELAY_PARAM
DELAY_PARAM = \Guzzle\Http\Curl\CurlMultiInterface::BLOCKING
Plugin to automatically retry failed HTTP requests using a backoff strategy
$eventDispatcher : \Symfony\Component\EventDispatcher\EventDispatcherInterface
$strategy : \Guzzle\Plugin\Backoff\BackoffStrategyInterface
setEventDispatcher(\Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher) : self
Set the EventDispatcher of the request
\Symfony\Component\EventDispatcher\EventDispatcherInterface | $eventDispatcher |
getEventDispatcher() : \Symfony\Component\EventDispatcher\EventDispatcherInterface
Get the EventDispatcher of the request
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
addSubscriber(\Symfony\Component\EventDispatcher\EventSubscriberInterface $subscriber) : self
Add an event subscriber to the dispatcher
\Symfony\Component\EventDispatcher\EventSubscriberInterface | $subscriber | Event subscriber |
__construct(\Guzzle\Plugin\Backoff\BackoffStrategyInterface $strategy = null)
\Guzzle\Plugin\Backoff\BackoffStrategyInterface | $strategy | The backoff strategy used to determine whether or not to retry and the amount of delay between retries. |
getExponentialBackoff(integer $maxRetries = 3, array $httpCodes = null, array $curlCodes = null) : self
Retrieve a basic truncated exponential backoff plugin that will retry HTTP errors and cURL errors
integer | $maxRetries | Maximum number of retries |
array | $httpCodes | HTTP response codes to retry |
array | $curlCodes | cURL error codes to retry |
getSubscribedEvents() : array
Returns an array of event names this subscriber wants to listen to.
The array keys are event names and the value can be:
For instance:
The event names to listen to
onRequestSent(\Guzzle\Common\Event $event)
Called when a request has been sent and isn't finished processing
\Guzzle\Common\Event | $event |
onRequestPoll(\Guzzle\Common\Event $event)
Called when a request is polling in the curl multi object
\Guzzle\Common\Event | $event |