public function addServer($name, ServerInterface $server)
    {
        if (null === $server) {
            throw new \InvalidArgumentException('The server can not be null.');
        }

        if (true === isset($this->servers[$name])) {
            throw new \InvalidArgumentException(sprintf('The server "%s" is already registered.', $name));
        }

        $this->servers[$name] = $server;

        return $this;
    }
public function addServer($name, ServerInterface $server)
    {
        if (null === $server) {
            throw new \InvalidArgumentException('The server can not be null.');
        }

        if (true === isset($this->servers[$name])) {
            throw new \InvalidArgumentException(sprintf('The server "%s" is already registered.', $name));
        }

        $this->servers[$name] = $server;

        return $this;
    }
public function addServer ( $ name , ServerInterface $ server ) { if ( null === $ server ) { throw new \ InvalidArgumentException ( 'The server can not be null.' ) ; } if ( true === isset ( $ this -> servers [ $ name ] ) ) { throw new \ InvalidArgumentException ( sprintf ( 'The server "%s" is already registered.' , $ name ) ) ; } $ this -> servers [ $ name ] = $ server ; return $ this ; }
Adds a server to the list

@param string $name
@param \Plum\Server\ServerInterface $server

@return \Plum\Plum
Adds a server to the list