src/josegonzalez/Queuesadilla/Event/EventManagerTrait.php
public function eventManager(EmitterInterface $eventManager = null)
    {
        if ($eventManager !== null) {
            $this->eventManager = $eventManager;
        } elseif (empty($this->eventManager)) {
            $this->eventManager = new EventManager();
        }

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

        return $this->eventManager;
    }
public function eventManager ( EmitterInterface $ eventManager = null ) { if ( $ eventManager !== null ) { $ this -> eventManager = $ eventManager ; } elseif ( empty ( $ this -> eventManager ) ) { $ this -> eventManager = new EventManager ( ) ; } return $ this -> eventManager ; }
Returns the League\Event\EmitterInterface manager instance for this object.

You can use this instance to register any new listeners or callbacks to the
object events, or create your own events and trigger them at will.

@param \League\Event\EmitterInterface $eventManager the eventManager to set
@return \League\Event\EmitterInterface
Returns the League \ Event \ EmitterInterface manager instance for this object .