Merge pull request #388 from m4tthumphrey/master

Added priority argument
This commit is contained in:
Alex Bilbie 2015-10-13 11:21:52 +01:00
commit 03815cec6d

View File

@ -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);
}
/**