public function __construct(LoopInterface $loop = null) { if ($loop !== null) { $this->emitter = new AsyncEventEmitter($loop); } else { $this->emitter = new BaseEventEmitter(); } }