library/Rediska/Command/SlaveOf.php
public function create($aliasOrConnection)
    {
        if ($aliasOrConnection === false) {
            $host = 'no';
            $port = 'one';
        } else {
            if ($aliasOrConnection instanceof Rediska_Connection) {
                $connection = $aliasOrConnection;
            } else {
                $alias = $aliasOrConnection;
                $connection = $this->_rediska->getConnectionByAlias($alias);
            }

            $host = $connection->getHost();
            $port = $connection->getPort();
        }

        $command = array('SLAVEOF',
                         $host,
                         $port);
        $commands = array();
        foreach($this->_rediska->getConnections() as $connection) {
            $commands[] = new Rediska_Connection_Exec($connection, $command);
        }
        
        return $commands;
    }
public function create($aliasOrConnection)
    {
        if ($aliasOrConnection === false) {
            $host = 'no';
            $port = 'one';
        } else {
            if ($aliasOrConnection instanceof Rediska_Connection) {
                $connection = $aliasOrConnection;
            } else {
                $alias = $aliasOrConnection;
                $connection = $this->_rediska->getConnectionByAlias($alias);
            }

            $host = $connection->getHost();
            $port = $connection->getPort();
        }

        $command = array('SLAVEOF',
                         $host,
                         $port);
        $commands = array();
        foreach($this->_rediska->getConnections() as $connection) {
            $commands[] = new Rediska_Connection_Exec($connection, $command);
        }
        
        return $commands;
    }
Create command

@param string|Rediska_Connection|false $aliasOrConnection Server alias, Rediska_Connection object or false if not slave
@return Rediska_Connection_Exec