Added priority argument

This commit is contained in:
Matt Humphrey 2015-10-13 11:16:49 +01:00
parent 3bcd8fc3f8
commit c71dc47459

View File

@ -122,10 +122,11 @@ abstract class AbstractServer
* *
* @param string $eventName Event name * @param string $eventName Event name
* @param callable $listener Callable function or method * @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);
} }
/** /**