src/Observer/Observer.php
public static function setEvents($pEvents = NULL)
    {
        if ($pEvents === NULL) {
            $pEvents = Agl::app()->getConfig('main/events');
        }

        if (is_array($pEvents)) {
            self::$_events = $pEvents;
        } else {
            self::$_events = array();
        }

        return self::$_events;
    }
public static function setEvents($pEvents = NULL)
    {
        if ($pEvents === NULL) {
            $pEvents = Agl::app()->getConfig('main/events');
        }

        if (is_array($pEvents)) {
            self::$_events = $pEvents;
        } else {
            self::$_events = array();
        }

        return self::$_events;
    }
public static function setEvents ( $ pEvents = NULL ) { if ( $ pEvents === NULL ) { $ pEvents = Agl :: app ( ) -> getConfig ( 'main/events' ) ; } if ( is_array ( $ pEvents ) ) { self :: $ _events = $ pEvents ; } else { self :: $ _events = array ( ) ; } return self :: $ _events ; }
Register events. Get events from the configuration by default.

@param $pEvents null|array
@return array
Register events . Get events from the configuration by default .