3
namespace GuzzleHttp\Event;
6
* SubscriberInterface provides an array of events to an
7
* EventEmitterInterface when it is registered. The emitter then binds the
8
* listeners specified by the EventSubscriber.
10
* This interface is based on the SubscriberInterface of the Symfony.
11
* @link https://github.com/symfony/symfony/tree/master/src/Symfony/Component/EventDispatcher
13
interface SubscriberInterface
16
* Returns an array of event names this subscriber wants to listen to.
18
* The returned array keys MUST map to an event name. Each array value
19
* MUST be an array in which the first element is the name of a function
20
* on the EventSubscriber OR an array of arrays in the aforementioned
21
* format. The second element in the array is optional, and if specified,
22
* designates the event priority.
24
* For example, the following are all valid:
26
* - ['eventName' => ['methodName']]
27
* - ['eventName' => ['methodName', $priority]]
28
* - ['eventName' => [['methodName'], ['otherMethod']]
29
* - ['eventName' => [['methodName'], ['otherMethod', $priority]]
30
* - ['eventName' => [['methodName', $priority], ['otherMethod', $priority]]
34
public function getEvents();