~tcuthbert/wordpress/openstack-objectstorage

« back to all changes in this revision

Viewing changes to vendor/guzzlehttp/guzzle/src/Event/SubscriberInterface.php

  • Committer: Jacek Nykis
  • Date: 2015-02-11 15:35:31 UTC
  • Revision ID: jacek.nykis@canonical.com-20150211153531-hmy6zi0ov2qfkl0b
Initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
}