Skip to content

Commit f8019c8

Browse files
committed
add method getListenerPriority() to interface
1 parent 99de3fd commit f8019c8

File tree

4 files changed

+17
-8
lines changed

4 files changed

+17
-8
lines changed

UPGRADE-3.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,8 @@ UPGRADE FROM 2.x to 3.0
107107

108108
### EventDispatcher
109109

110+
* The method `getListenerPriority($eventName, $listener)` has been added to the
111+
`EventDispatcherInterface`.
110112
* The interface `Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcherInterface`
111113
extends `Symfony\Component\EventDispatcher\EventDispatcherInterface`.
112114

src/Symfony/Component/EventDispatcher/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ CHANGELOG
44
3.0.0
55
-----
66

7+
* The method `getListenerPriority($eventName, $listener)` has been added to the
8+
`EventDispatcherInterface`.
79
* The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()`
810
and `Event::getName()` have been removed.
911
The event dispatcher and the event name are passed to the listener call.

src/Symfony/Component/EventDispatcher/EventDispatcher.php

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,14 +73,7 @@ public function getListeners($eventName = null)
7373
}
7474

7575
/**
76-
* Gets the listener priority for a specific event.
77-
*
78-
* Returns null if the event or the listener does not exist.
79-
*
80-
* @param string $eventName The name of the event
81-
* @param callable $listener The listener to remove
82-
*
83-
* @return int|null The event listener priority
76+
* {@inheritdoc}
8477
*/
8578
public function getListenerPriority($eventName, $listener)
8679
{

src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ public function removeSubscriber(EventSubscriberInterface $subscriber);
7777
*/
7878
public function getListeners($eventName = null);
7979

80+
/**
81+
* Gets the listener priority for a specific event.
82+
*
83+
* Returns null if the event or the listener does not exist.
84+
*
85+
* @param string $eventName The name of the event
86+
* @param callable $listener The listener
87+
*
88+
* @return int|null The event listener priority
89+
*/
90+
public function getListenerPriority($eventName, $listener);
91+
8092
/**
8193
* Checks whether an event has any registered listeners.
8294
*

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy