src/Tale/Event/EmitterTrait.php
public function getEvent($name)
    {

        if (!isset($this->_events))
            $this->_events = [];

        if (!isset($this->_events[$name])) {

            $className = $this->getEventClassName();
            $this->_events[$name] = new $className($name);
        }

        return $this->_events[$name];
    }
public function getEvent($name)
    {

        if (!isset($this->_events))
            $this->_events = [];

        if (!isset($this->_events[$name])) {

            $className = $this->getEventClassName();
            $this->_events[$name] = new $className($name);
        }

        return $this->_events[$name];
    }
public function getEvent ( $ name ) { if ( ! isset ( $ this -> _events ) ) $ this -> _events = [ ] ; if ( ! isset ( $ this -> _events [ $ name ] ) ) { $ className = $ this -> getEventClassName ( ) ; $ this -> _events [ $ name ] = new $ className ( $ name ) ; } return $ this -> _events [ $ name ] ; }
Returns an event by name.
If the event doesnt exist yet, it is created

@param $name The name of the event

@return \Tale\Event The unique event instance
Returns an event by name . If the event doesnt exist yet it is created