From c71dc47459f78e111b094ce6c4fa3ae2e0c92085 Mon Sep 17 00:00:00 2001 From: Matt Humphrey Date: Tue, 13 Oct 2015 11:16:49 +0100 Subject: [PATCH] Added priority argument --- src/AbstractServer.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/AbstractServer.php b/src/AbstractServer.php index 7d4ba202..ec4b2ae8 100644 --- a/src/AbstractServer.php +++ b/src/AbstractServer.php @@ -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); } /**