public static function trigger($name, array $args = array())
    {
        if ($name === 'error') {
            self::$state = 5;
        }

        if (empty(self::$events[$name])) {
            return null;
        }

        $listen = self::$events[$name];

        usort($listen, function ($a, $b) {
            return $b[1] >= $a[1];
        });

        foreach ($listen as $callback) {
            call_user_func_array($callback[0], $args);
        }

        $listen = null;
    }
public static function trigger($name, array $args = array())
    {
        if ($name === 'error') {
            self::$state = 5;
        }

        if (empty(self::$events[$name])) {
            return null;
        }

        $listen = self::$events[$name];

        usort($listen, function ($a, $b) {
            return $b[1] >= $a[1];
        });

        foreach ($listen as $callback) {
            call_user_func_array($callback[0], $args);
        }

        $listen = null;
    }
public static function trigger ( $ name , array $ args = array ( ) ) { if ( $ name === 'error' ) { self :: $ state = 5 ; } if ( empty ( self :: $ events [ $ name ] ) ) { return null ; } $ listen = self :: $ events [ $ name ] ; usort ( $ listen , function ( $ a , $ b ) { return $ b [ 1 ] >= $ a [ 1 ] ; } ) ; foreach ( $ listen as $ callback ) { call_user_func_array ( $ callback [ 0 ] , $ args ) ; } $ listen = null ; }
Trigger registered event

@param string $name
@param array  $args
@return void
Trigger registered event