public function getConnectionByKey($key, $cb = null)
    {
        if (is_object($key)) {
            return $key->onConnected($cb);
        }
        srand(crc32($key));
        $addr = array_rand($this->servers);
        srand();
        return $this->getConnection($addr, $cb);
    }
public function getConnectionByKey($key, $cb = null)
    {
        if (is_object($key)) {
            return $key->onConnected($cb);
        }
        srand(crc32($key));
        $addr = array_rand($this->servers);
        srand();
        return $this->getConnection($addr, $cb);
    }
public function getConnectionByKey ( $ key , $ cb = null ) { if ( is_object ( $ key ) ) { return $ key -> onConnected ( $ cb ) ; } srand ( crc32 ( $ key ) ) ; $ addr = array_rand ( $ this -> servers ) ; srand ( ) ; return $ this -> getConnection ( $ addr , $ cb ) ; }
Returns available connection from the pool by key
@param  string $key Key
@param  callable $cb Callback
@callback $cb ( )
@return boolean       Success
Returns available connection from the pool by key