public function getEvent($name, $default = null)
    {
        if (isset($this->events[$name])) {
            return $this->events[$name];
        }

        return $default;
    }
public function getEvent($name, $default = null)
    {
        if (isset($this->events[$name])) {
            return $this->events[$name];
        }

        return $default;
    }
public function getEvent ( $ name , $ default = null ) { if ( isset ( $ this -> events [ $ name ] ) ) { return $ this -> events [ $ name ] ; } return $ default ; }
Get the event object identified by the given name.

@param   string $name    The event name.
@param   mixed  $default The default value if the event was not registered.

@return  EventInterface|mixed  The event of the default value.

@since   2.0
Get the event object identified by the given name .