annotate vendor/symfony/event-dispatcher/EventSubscriberInterface.php @ 2:92f882872392

Trusted hosts, + remove migration modules
author Chris Cannam
date Tue, 05 Dec 2017 09:26:43 +0000
parents 4c8ae668cc8c
children 129ea1e6d783
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@0 15 * An EventSubscriber knows himself what events he 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@0 39 * * array('eventName' => 'methodName')
Chris@0 40 * * array('eventName' => array('methodName', $priority))
Chris@0 41 * * array('eventName' => array(array('methodName1', $priority), array('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 }