public function addServers(array $servers = array())
    {
        $result = true;

        foreach ($servers as $server) {
            if (false === is_array($server)) {
                throw new CacheException('Memcache adapter: server configuration is not an array.');
            }

            $server = array_merge($this->_default_server, $server);
            $result = $result && $this->addServer($server['host'], $server['port'], true, $server['weight']);

            $this->setServerList($server);
        }

        return $result;
    }
public function addServers(array $servers = array())
    {
        $result = true;

        foreach ($servers as $server) {
            if (false === is_array($server)) {
                throw new CacheException('Memcache adapter: server configuration is not an array.');
            }

            $server = array_merge($this->_default_server, $server);
            $result = $result && $this->addServer($server['host'], $server['port'], true, $server['weight']);

            $this->setServerList($server);
        }

        return $result;
    }
public function addServers ( array $ servers = array ( ) ) { $ result = true ; foreach ( $ servers as $ server ) { if ( false === is_array ( $ server ) ) { throw new CacheException ( 'Memcache adapter: server configuration is not an array.' ) ; } $ server = array_merge ( $ this -> _default_server , $ server ) ; $ result = $ result && $ this -> addServer ( $ server [ 'host' ] , $ server [ 'port' ] , true , $ server [ 'weight' ] ) ; $ this -> setServerList ( $ server ) ; } return $ result ; }
Adds a set of servers to the memcache instance pool.

@param array $servers

@return boolean

@throws \BackBee\Cache\Exception\CacheException Occurs if one of the server configurations is not an array

@link http://php.net/manual/en/Memcache.addservers.php
Adds a set of servers to the memcache instance pool .