src/Dispatcher/Dispatcher.php
public function listen($event, callable $handler)
    {
        if (empty($this->handlers[$event])) {
            $this->handlers[$event] = [];
        }

        $this->handlers[$event][] = $handler;
    }
public function listen($event, callable $handler)
    {
        if (empty($this->handlers[$event])) {
            $this->handlers[$event] = [];
        }

        $this->handlers[$event][] = $handler;
    }
public function listen ( $ event , callable $ handler ) { if ( empty ( $ this -> handlers [ $ event ] ) ) { $ this -> handlers [ $ event ] = [ ] ; } $ this -> handlers [ $ event ] [ ] = $ handler ; }
Specify an event listener for a project.

@param string   $event
@param callable $handler
Specify an event listener for a project .