public function addListener(Listener $listener) : void {
        $this->listeners = $this->listeners->add($listener);
    }
public function addListener(Listener $listener) : void {
        $this->listeners = $this->listeners->add($listener);
    }
public function addListener ( Listener $ listener ) : void { $ this -> listeners = $ this -> listeners -> add ( $ listener ) ; }
add an event listener to the dispatcher

@param Listener $listener
add an event listener to the dispatcher