Library/EventsManager.php
public function listen($event, $callback)
    {
        if (!isset($this->listeners[$event])) {
            $this->listeners[$event] = [];
        }

        $this->listeners[$event][] = $callback;
    }
public function listen($event, $callback)
    {
        if (!isset($this->listeners[$event])) {
            $this->listeners[$event] = [];
        }

        $this->listeners[$event][] = $callback;
    }
public function listen ( $ event , $ callback ) { if ( ! isset ( $ this -> listeners [ $ event ] ) ) { $ this -> listeners [ $ event ] = [ ] ; } $ this -> listeners [ $ event ] [ ] = $ callback ; }
Attaches a listener to a specific event type.

@param $event
@param $callback
Attaches a listener to a specific event type .