Event.php
public static function addListener(string $event, $function, int $priority = 10, array $args = null) : void
    {
        Event::$listeners[$event][$priority][] = [
            'function'  => $function,
            'args'      => $args
        ];
    }
public static function addListener(string $event, $function, int $priority = 10, array $args = null) : void
    {
        Event::$listeners[$event][$priority][] = [
            'function'  => $function,
            'args'      => $args
        ];
    }
public static function addListener ( string $ event , $ function , int $ priority = 10 , array $ args = null ) : void { Event :: $ listeners [ $ event ] [ $ priority ] [ ] = [ 'function' => $ function , 'args' => $ args ] ; }
Add new listener

Event::addListener('event_name', function() { echo 'Test Event 1'; }, 1);
Event::addListener('event_name', function() { echo 'Test Event 2'; }, 2);

@access public
@param  string  $event     Event name
@param  mixed   $function  Function to add
@param  integer $priority  Priority. Default is 10
@param  array   $args      Function aguments
@return void
Add new listener