Open Journal Systems  3.3.0
Symfony\Component\EventDispatcher\EventSubscriberInterface Interface Reference
Inheritance diagram for Symfony\Component\EventDispatcher\EventSubscriberInterface:
Guzzle\Http\RedirectPlugin Guzzle\Plugin\Async\AsyncPlugin Guzzle\Plugin\Backoff\BackoffLogger Guzzle\Plugin\Backoff\BackoffPlugin Guzzle\Plugin\Cache\CachePlugin Guzzle\Plugin\Cookie\CookiePlugin Guzzle\Plugin\CurlAuth\CurlAuthPlugin Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin Guzzle\Plugin\History\HistoryPlugin Guzzle\Plugin\Log\LogPlugin Guzzle\Plugin\Md5\CommandContentMd5Plugin Guzzle\Plugin\Md5\Md5ValidatorPlugin Guzzle\Plugin\Mock\MockPlugin Guzzle\Plugin\Oauth\OauthPlugin Guzzle\Tests\Mock\MockObserver Guzzle\Tests\Plugin\Backoff\BackoffPluginTest Symfony\Component\EventDispatcher\Tests\Debug\EventSubscriber Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService Symfony\Component\EventDispatcher\Tests\SubscriberService Symfony\Component\EventDispatcher\Tests\TestEventSubscriber Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithMultipleListeners Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithPriorities

Static Public Member Functions

static getSubscribedEvents ()
 
static getSubscribedEvents ()
 

Detailed Description

An EventSubscriber knows himself what events he is interested in. If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes getSubscribedEvents and registers the subscriber as a listener for all returned events.

Author
Guilherme Blanco guilh.nosp@m.erme.nosp@m.blanc.nosp@m.o@ho.nosp@m.tmail.nosp@m..com
Jonathan Wage jonwa.nosp@m.ge@g.nosp@m.mail..nosp@m.com
Roman Borschel roman.nosp@m.@cod.nosp@m.e-fac.nosp@m.tory.nosp@m..org
Bernhard Schussek bschu.nosp@m.ssek.nosp@m.@gmai.nosp@m.l.co.nosp@m.m

Definition at line 25 of file lib/vendor/symfony/event-dispatcher/EventSubscriberInterface.php.

Member Function Documentation

◆ getSubscribedEvents() [1/2]

static Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents ( )
static

Returns an array of event names this subscriber wants to listen to.

The array keys are event names and the value can be:

  • The method name to call (priority defaults to 0)
  • An array composed of the method name to call and the priority
  • An array of arrays composed of the method names to call and respective priorities, or 0 if unset

For instance:

  • array('eventName' => 'methodName')
  • array('eventName' => array('methodName', $priority))
  • array('eventName' => array(array('methodName1', $priority), array('methodName2')))
Returns
array The event names to listen to

Implemented in Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithMultipleListeners, Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithMultipleListeners, Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithPriorities, Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithPriorities, Symfony\Component\EventDispatcher\Tests\TestEventSubscriber, Symfony\Component\EventDispatcher\Tests\TestEventSubscriber, Symfony\Component\EventDispatcher\Tests\SubscriberService, Symfony\Component\EventDispatcher\Tests\SubscriberService, Symfony\Component\EventDispatcher\Tests\Debug\EventSubscriber, Symfony\Component\EventDispatcher\Tests\Debug\EventSubscriber, Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService, Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService, Guzzle\Plugin\Cache\CachePlugin, Guzzle\Plugin\Log\LogPlugin, Guzzle\Plugin\Backoff\BackoffPlugin, Guzzle\Plugin\Oauth\OauthPlugin, Guzzle\Plugin\Mock\MockPlugin, Guzzle\Plugin\Backoff\BackoffLogger, Guzzle\Plugin\Md5\Md5ValidatorPlugin, Guzzle\Plugin\Md5\CommandContentMd5Plugin, Guzzle\Http\RedirectPlugin, Guzzle\Tests\Plugin\Backoff\BackoffPluginTest, Guzzle\Plugin\CurlAuth\CurlAuthPlugin, Guzzle\Plugin\Cookie\CookiePlugin, Guzzle\Plugin\History\HistoryPlugin, Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin, Guzzle\Plugin\Async\AsyncPlugin, and Guzzle\Tests\Mock\MockObserver.

Referenced by Symfony\Component\EventDispatcher\EventDispatcher\addSubscriber(), and Symfony\Component\EventDispatcher\EventDispatcher\removeSubscriber().

◆ getSubscribedEvents() [2/2]

static Symfony\Component\EventDispatcher\EventSubscriberInterface::getSubscribedEvents ( )
static

Returns an array of event names this subscriber wants to listen to.

The array keys are event names and the value can be:

  • The method name to call (priority defaults to 0)
  • An array composed of the method name to call and the priority
  • An array of arrays composed of the method names to call and respective priorities, or 0 if unset

For instance:

  • array('eventName' => 'methodName')
  • array('eventName' => array('methodName', $priority))
  • array('eventName' => array(array('methodName1', $priority), array('methodName2')))
Returns
array The event names to listen to

Implemented in Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithMultipleListeners, Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithMultipleListeners, Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithPriorities, Symfony\Component\EventDispatcher\Tests\TestEventSubscriberWithPriorities, Symfony\Component\EventDispatcher\Tests\TestEventSubscriber, Symfony\Component\EventDispatcher\Tests\TestEventSubscriber, Symfony\Component\EventDispatcher\Tests\SubscriberService, Symfony\Component\EventDispatcher\Tests\SubscriberService, Symfony\Component\EventDispatcher\Tests\Debug\EventSubscriber, Symfony\Component\EventDispatcher\Tests\Debug\EventSubscriber, Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService, Symfony\Component\EventDispatcher\Tests\DependencyInjection\SubscriberService, Guzzle\Plugin\Cache\CachePlugin, Guzzle\Plugin\Log\LogPlugin, Guzzle\Plugin\Backoff\BackoffPlugin, Guzzle\Plugin\Oauth\OauthPlugin, Guzzle\Plugin\Mock\MockPlugin, Guzzle\Plugin\Backoff\BackoffLogger, Guzzle\Plugin\Md5\Md5ValidatorPlugin, Guzzle\Plugin\Md5\CommandContentMd5Plugin, Guzzle\Http\RedirectPlugin, Guzzle\Tests\Plugin\Backoff\BackoffPluginTest, Guzzle\Plugin\CurlAuth\CurlAuthPlugin, Guzzle\Plugin\Cookie\CookiePlugin, Guzzle\Plugin\History\HistoryPlugin, Guzzle\Plugin\ErrorResponse\ErrorResponsePlugin, Guzzle\Plugin\Async\AsyncPlugin, and Guzzle\Tests\Mock\MockObserver.


The documentation for this interface was generated from the following file: