Skip to content

Commit

Permalink
Added priority argument
Browse files Browse the repository at this point in the history
  • Loading branch information
m4tthumphrey committed Oct 13, 2015
1 parent 3bcd8fc commit c71dc47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/AbstractServer.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,10 +122,11 @@ public function setEventEmitter($emitter = null)
*
* @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);
}

/**
Expand Down

0 comments on commit c71dc47

Please sign in to comment.