diff options
author | Andreas Baumann <mail@andreasbaumann.cc> | 2019-11-17 20:45:02 +0100 |
---|---|---|
committer | Andreas Baumann <mail@andreasbaumann.cc> | 2019-11-17 20:45:02 +0100 |
commit | 8df3db566a3a937b45ebf11adb90d265e6f5e2d4 (patch) | |
tree | 4d541098d751d5a9acf8c12f6fb9f308ace066ac /vendor/guzzle/guzzle/src/Guzzle/Common/HasDispatcherInterface.php | |
download | flyspray-8df3db566a3a937b45ebf11adb90d265e6f5e2d4.tar.xz |
initial checking of customized version 1.0rc9
Diffstat (limited to 'vendor/guzzle/guzzle/src/Guzzle/Common/HasDispatcherInterface.php')
-rw-r--r-- | vendor/guzzle/guzzle/src/Guzzle/Common/HasDispatcherInterface.php | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/vendor/guzzle/guzzle/src/Guzzle/Common/HasDispatcherInterface.php b/vendor/guzzle/guzzle/src/Guzzle/Common/HasDispatcherInterface.php new file mode 100644 index 0000000..8067598 --- /dev/null +++ b/vendor/guzzle/guzzle/src/Guzzle/Common/HasDispatcherInterface.php @@ -0,0 +1,54 @@ +<?php + +namespace Guzzle\Common; + +use Symfony\Component\EventDispatcher\EventDispatcherInterface; +use Symfony\Component\EventDispatcher\EventSubscriberInterface; + +/** + * Holds an event dispatcher + */ +interface HasDispatcherInterface +{ + /** + * Get a list of all of the events emitted from the class + * + * @return array + */ + public static function getAllEvents(); + + /** + * Set the EventDispatcher of the request + * + * @param EventDispatcherInterface $eventDispatcher + * + * @return self + */ + public function setEventDispatcher(EventDispatcherInterface $eventDispatcher); + + /** + * Get the EventDispatcher of the request + * + * @return EventDispatcherInterface + */ + public function getEventDispatcher(); + + /** + * 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 + * + * @return Event Returns the created event object + */ + public function dispatch($eventName, array $context = array()); + + /** + * Add an event subscriber to the dispatcher + * + * @param EventSubscriberInterface $subscriber Event subscriber + * + * @return self + */ + public function addSubscriber(EventSubscriberInterface $subscriber); +} |