Chris@0: Chris@0: * Chris@0: * For the full copyright and license information, please view the LICENSE Chris@0: * file that was distributed with this source code. Chris@0: */ Chris@0: Chris@0: namespace Symfony\Component\EventDispatcher; Chris@0: Chris@0: /** Chris@17: * An EventSubscriber knows itself what events it is interested in. Chris@0: * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes Chris@0: * {@link getSubscribedEvents} and registers the subscriber as a listener for all Chris@0: * returned events. Chris@0: * Chris@0: * @author Guilherme Blanco Chris@0: * @author Jonathan Wage Chris@0: * @author Roman Borschel Chris@0: * @author Bernhard Schussek Chris@0: */ Chris@0: interface EventSubscriberInterface Chris@0: { Chris@0: /** Chris@0: * Returns an array of event names this subscriber wants to listen to. Chris@0: * Chris@0: * The array keys are event names and the value can be: Chris@0: * Chris@0: * * The method name to call (priority defaults to 0) Chris@0: * * An array composed of the method name to call and the priority Chris@0: * * An array of arrays composed of the method names to call and respective Chris@0: * priorities, or 0 if unset Chris@0: * Chris@0: * For instance: Chris@0: * Chris@17: * * ['eventName' => 'methodName'] Chris@17: * * ['eventName' => ['methodName', $priority]] Chris@17: * * ['eventName' => [['methodName1', $priority], ['methodName2']]] Chris@0: * Chris@0: * @return array The event names to listen to Chris@0: */ Chris@0: public static function getSubscribedEvents(); Chris@0: }