public function addEvent(EventInterface $event)
    {
        if (!isset($this->events[$event->getName()])) {
            $this->events[$event->getName()] = $event;
        }

        return $this;
    }
public function addEvent(EventInterface $event)
    {
        if (!isset($this->events[$event->getName()])) {
            $this->events[$event->getName()] = $event;
        }

        return $this;
    }
public function addEvent ( EventInterface $ event ) { if ( ! isset ( $ this -> events [ $ event -> getName ( ) ] ) ) { $ this -> events [ $ event -> getName ( ) ] = $ event ; } return $ this ; }
Add an event to this dispatcher, only if it is not existing.

@param   EventInterface $event The event.

@return  static  This method is chainable.

@since   2.0
Add an event to this dispatcher only if it is not existing .