public function addPoller(Poller $poller)
    {
        $name = $poller->getName();
        if (array_key_exists($name, $this->pollers)) {
            throw new InvalidArgumentException("Poller named '$name' already exists");
        }

        $this->pollers[$name] = $poller;
    }
public function addPoller(Poller $poller)
    {
        $name = $poller->getName();
        if (array_key_exists($name, $this->pollers)) {
            throw new InvalidArgumentException("Poller named '$name' already exists");
        }

        $this->pollers[$name] = $poller;
    }
public function addPoller ( Poller $ poller ) { $ name = $ poller -> getName ( ) ; if ( array_key_exists ( $ name , $ this -> pollers ) ) { throw new InvalidArgumentException ( "Poller named '$name' already exists" ) ; } $ this -> pollers [ $ name ] = $ poller ; }
Add poller to collection

@param Poller $poller

@throws InvalidArgumentException in case when poller with the same name already exists
Add poller to collection