public function eventManager(EmitterInterface $eventManager = null)
    {
        if ($eventManager !== null) {
            $this->eventManager = $eventManager;
        } elseif (empty($this->eventManager)) {
            $this->eventManager = new EventManager();
        }

        return $this->eventManager;
    }