src/Fasim/Cache/simulate/Memcached.php
public function addServer($host, $port = 11211, $weight = 0)
    {
        $key = $this->getServerKey($host, $port, $weight);
        if (isset($this->server[$key])) {
            // Dup
            $this->resultCode = Memcached::RES_FAILURE;
            $this->resultMessage = 'Server duplicate.';
            return false;

        } else {
            $this->server[$key] = array(
                'host'  => $host,
                'port'  => $port,
                'weight'    => $weight,
            );

            $this->connect();
            return true;
        }
    }
public function addServer($host, $port = 11211, $weight = 0)
    {
        $key = $this->getServerKey($host, $port, $weight);
        if (isset($this->server[$key])) {
            // Dup
            $this->resultCode = Memcached::RES_FAILURE;
            $this->resultMessage = 'Server duplicate.';
            return false;

        } else {
            $this->server[$key] = array(
                'host'  => $host,
                'port'  => $port,
                'weight'    => $weight,
            );

            $this->connect();
            return true;
        }
    }
public function addServer ( $ host , $ port = 11211 , $ weight = 0 ) { $ key = $ this -> getServerKey ( $ host , $ port , $ weight ) ; if ( isset ( $ this -> server [ $ key ] ) ) { // Dup $ this -> resultCode = Memcached :: RES_FAILURE ; $ this -> resultMessage = 'Server duplicate.' ; return false ; } else { $ this -> server [ $ key ] = array ( 'host' => $ host , 'port' => $ port , 'weight' => $ weight , ) ; $ this -> connect ( ) ; return true ; } }
Add a serer to the server pool

@param   string  $host
@param   int     $port
@param   int     $weight
@return  boolean
Add a serer to the server pool