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

[EventDispatcher] add method getListenerPriority() to interface #16301

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 23, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add method getListenerPriority() to interface
  • Loading branch information
xabbuh committed Oct 20, 2015
commit f8019c80b4bab8dccd198a0bb7c954dfb5153cc3
2 changes: 2 additions & 0 deletions 2 UPGRADE-3.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ UPGRADE FROM 2.x to 3.0

### EventDispatcher

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

Expand Down
2 changes: 2 additions & 0 deletions 2 src/Symfony/Component/EventDispatcher/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ CHANGELOG
3.0.0
-----

* The method `getListenerPriority($eventName, $listener)` has been added to the
`EventDispatcherInterface`.
* The methods `Event::setDispatcher()`, `Event::getDispatcher()`, `Event::setName()`
and `Event::getName()` have been removed.
The event dispatcher and the event name are passed to the listener call.
Expand Down
9 changes: 1 addition & 8 deletions 9 src/Symfony/Component/EventDispatcher/EventDispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,7 @@ public function getListeners($eventName = null)
}

/**
* Gets the listener priority for a specific event.
*
* Returns null if the event or the listener does not exist.
*
* @param string $eventName The name of the event
* @param callable $listener The listener to remove
*
* @return int|null The event listener priority
* {@inheritdoc}
*/
public function getListenerPriority($eventName, $listener)
{
Expand Down
12 changes: 12 additions & 0 deletions 12 src/Symfony/Component/EventDispatcher/EventDispatcherInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ public function removeSubscriber(EventSubscriberInterface $subscriber);
*/
public function getListeners($eventName = null);

/**
* Gets the listener priority for a specific event.
*
* Returns null if the event or the listener does not exist.
*
* @param string $eventName The name of the event
* @param callable $listener The listener
*
* @return int|null The event listener priority
*/
public function getListenerPriority($eventName, $listener);

/**
* Checks whether an event has any registered listeners.
*
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.