public function addListener(ListenerInterface $listener)
    {
        if (!in_array($listener, $this->collection_listeners, true)) {
            $this->collection_listeners[] = $listener;
        }
    }
public function addListener(ListenerInterface $listener)
    {
        if (!in_array($listener, $this->collection_listeners, true)) {
            $this->collection_listeners[] = $listener;
        }
    }
public function addListener ( ListenerInterface $ listener ) { if ( ! in_array ( $ listener , $ this -> collection_listeners , true ) ) { $ this -> collection_listeners [ ] = $ listener ; } }
Attaches the given listener, so it will be informed about all future changes.

@param ListenerInterface $listener
Attaches the given listener so it will be informed about all future changes .