mirror of
https://github.com/elyby/oauth2-server.git
synced 2024-12-25 06:30:13 +05:30
Added priority argument
This commit is contained in:
parent
3bcd8fc3f8
commit
c71dc47459
@ -122,10 +122,11 @@ abstract class AbstractServer
|
||||
*
|
||||
* @param string $eventName Event name
|
||||
* @param callable $listener Callable function or method
|
||||
* @param int $priority Priority of event listener
|
||||
*/
|
||||
public function addEventListener($eventName, callable $listener)
|
||||
public function addEventListener($eventName, callable $listener, $priority = Emitter::P_NORMAL)
|
||||
{
|
||||
$this->eventEmitter->addListener($eventName, $listener);
|
||||
$this->eventEmitter->addListener($eventName, $listener, $priority);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user