scratch – Blame information for rev 87

Subversion Repositories:
Rev:
Rev Author Line No. Line
87 office 1 <?php
2  
3 namespace GuzzleHttp\Event;
4  
5 /**
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.
9 *
10 * This interface is based on the SubscriberInterface of the Symfony.
11 * @link https://github.com/symfony/symfony/tree/master/src/Symfony/Component/EventDispatcher
12 */
13 interface SubscriberInterface
14 {
15 /**
16 * Returns an array of event names this subscriber wants to listen to.
17 *
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.
23 *
24 * For example, the following are all valid:
25 *
26 * - ['eventName' => ['methodName']]
27 * - ['eventName' => ['methodName', $priority]]
28 * - ['eventName' => [['methodName'], ['otherMethod']]
29 * - ['eventName' => [['methodName'], ['otherMethod', $priority]]
30 * - ['eventName' => [['methodName', $priority], ['otherMethod', $priority]]
31 *
32 * @return array
33 */
34 public function getEvents();
35 }