annotate vendor/symfony/event-dispatcher/EventSubscriberInterface.php @ 19:fa3358dc1485 tip

Add ndrum files
author Chris Cannam
date Wed, 28 Aug 2019 13:14:47 +0100
parents 129ea1e6d783
children
rev   line source
Chris@0 1 <?php
Chris@0 2
Chris@0 3 /*
Chris@0 4 * This file is part of the Symfony package.
Chris@0 5 *
Chris@0 6 * (c) Fabien Potencier <fabien@symfony.com>
Chris@0 7 *
Chris@0 8 * For the full copyright and license information, please view the LICENSE
Chris@0 9 * file that was distributed with this source code.
Chris@0 10 */
Chris@0 11
Chris@0 12 namespace Symfony\Component\EventDispatcher;
Chris@0 13
Chris@0 14 /**
Chris@17 15 * An EventSubscriber knows itself what events it is interested in.
Chris@0 16 * If an EventSubscriber is added to an EventDispatcherInterface, the manager invokes
Chris@0 17 * {@link getSubscribedEvents} and registers the subscriber as a listener for all
Chris@0 18 * returned events.
Chris@0 19 *
Chris@0 20 * @author Guilherme Blanco <guilhermeblanco@hotmail.com>
Chris@0 21 * @author Jonathan Wage <jonwage@gmail.com>
Chris@0 22 * @author Roman Borschel <roman@code-factory.org>
Chris@0 23 * @author Bernhard Schussek <bschussek@gmail.com>
Chris@0 24 */
Chris@0 25 interface EventSubscriberInterface
Chris@0 26 {
Chris@0 27 /**
Chris@0 28 * Returns an array of event names this subscriber wants to listen to.
Chris@0 29 *
Chris@0 30 * The array keys are event names and the value can be:
Chris@0 31 *
Chris@0 32 * * The method name to call (priority defaults to 0)
Chris@0 33 * * An array composed of the method name to call and the priority
Chris@0 34 * * An array of arrays composed of the method names to call and respective
Chris@0 35 * priorities, or 0 if unset
Chris@0 36 *
Chris@0 37 * For instance:
Chris@0 38 *
Chris@17 39 * * ['eventName' => 'methodName']
Chris@17 40 * * ['eventName' => ['methodName', $priority]]
Chris@17 41 * * ['eventName' => [['methodName1', $priority], ['methodName2']]]
Chris@0 42 *
Chris@0 43 * @return array The event names to listen to
Chris@0 44 */
Chris@0 45 public static function getSubscribedEvents();
Chris@0 46 }