public function hasEvent($name)
    {
        foreach ($this->_events as $event) {
            if ($event->getName() === $name) {
                return true;
            }
        }

        return false;
    }
public function hasEvent($name)
    {
        foreach ($this->_events as $event) {
            if ($event->getName() === $name) {
                return true;
            }
        }

        return false;
    }
public function hasEvent ( $ name ) { foreach ( $ this -> _events as $ event ) { if ( $ event -> getName ( ) === $ name ) { return true ; } } return false ; }
Checks if an event is in the list.

@param string $name Event name.
@return bool
Checks if an event is in the list .