public function triggered($eventName = null, $sort = true)
    {
        if ($eventName === null) {
            if ($sort) {
                arsort($this->_log, SORT_NATURAL);
            }

            return $this->_log;
        }
        if (isset($this->_log[$eventName])) {
            return $this->_log[$eventName];
        }

        return 0;
    }
public function triggered($eventName = null, $sort = true)
    {
        if ($eventName === null) {
            if ($sort) {
                arsort($this->_log, SORT_NATURAL);
            }

            return $this->_log;
        }
        if (isset($this->_log[$eventName])) {
            return $this->_log[$eventName];
        }

        return 0;
    }
public function triggered ( $ eventName = null , $ sort = true ) { if ( $ eventName === null ) { if ( $ sort ) { arsort ( $ this -> _log , SORT_NATURAL ) ; } return $ this -> _log ; } if ( isset ( $ this -> _log [ $ eventName ] ) ) { return $ this -> _log [ $ eventName ] ; } return 0 ; }
Retrieves the number of times an event was triggered, or the complete
list of events that were triggered.

@param string|null $eventName The name of the event, if null returns the entire
list of event that were fired
@param bool $sort If first argument is null set this to true to sort the list.
Defaults to true
@return int|array
Retrieves the number of times an event was triggered or the complete list of events that were triggered .