Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f8019c8

Browse filesBrowse files
committed
add method getListenerPriority() to interface
1 parent 99de3fd commit f8019c8
Copy full SHA for f8019c8

File tree

Expand file treeCollapse file tree

4 files changed

+17
-8
lines changed
Filter options
Expand file treeCollapse file tree

4 files changed

+17
-8
lines changed

‎UPGRADE-3.0.md

Copy file name to clipboardExpand all lines: UPGRADE-3.0.md
+2Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/EventDispatcher/CHANGELOG.md
+2Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/EventDispatcher/EventDispatcher.php
+1-8Lines 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

Copy file name to clipboardExpand all lines: src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php
+12Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.