public function hasListeners($eventName = null) {

	    if($eventName) {
            return !empty($this->registry[$eventName]);
        }

        foreach($this->registry as $eventName => $listeners) {
            if(!empty($listeners)) {
                return true;
            }
        }

        return false;

    }
public function hasListeners($eventName = null) {

	    if($eventName) {
            return !empty($this->registry[$eventName]);
        }

        foreach($this->registry as $eventName => $listeners) {
            if(!empty($listeners)) {
                return true;
            }
        }

        return false;

    }
public function hasListeners ( $ eventName = null ) { if ( $ eventName ) { return ! empty ( $ this -> registry [ $ eventName ] ) ; } foreach ( $ this -> registry as $ eventName => $ listeners ) { if ( ! empty ( $ listeners ) ) { return true ; } } return false ; }
check whether listeners for a given event name are registered
if no event name is supplied this will evaluate to true if
there any listeners registered

@param string $eventName
@return bool
check whether listeners for a given event name are registered if no event name is supplied this will evaluate to true if there any listeners registered