<?phpnamespaceGuzzle\Common;
useSymfony\Component\EventDispatcher\EventDispatcherInterface;
useSymfony\Component\EventDispatcher\EventSubscriberInterface;
/**
* Holds an event dispatcher
*/interfaceHasDispatcherInterface {
/**
* Get a list of all of the events emitted from the class
*
* @return array
*/
public static functiongetAllEvents();
/**
* Set the EventDispatcher of the request
*
* @param EventDispatcherInterface $eventDispatcher
*
* @return HasDispatcherInterface
*/
public functionsetEventDispatcher(EventDispatcherInterface $eventDispatcher);
/**
* Get the EventDispatcher of the request
*
* @return EventDispatcherInterface
*/
public functiongetEventDispatcher();
/**
* Helper to dispatch Guzzle events and set the event name on the event
*
* @param string $eventName Name of the event to dispatch
* @param array $context Context of the event
*/
public functiondispatch($eventName, array $context = array());
/**
* Add an event subscriber to the dispatcher
*
* @param EventSubscriberInterface $subscriber Event subscriber
*
* @return AbstractHasDispatcher
*/
public functionaddSubscriber(EventSubscriberInterface $subscriber);
}