library/Rediska/Transaction.php
public function watch($keyOrKeys)
    {
        $this->_throwIfNotSupported('Watch', '2.1');

        $command = array('WATCH');

        if (!is_array($keyOrKeys)) {
            $keys = array($keyOrKeys);
        } else {
            $keys = $keyOrKeys;
        }

        foreach($keys as $key) {
            $command[] = $this->_rediska->getOption('namespace') . $key;
        }

        $exec = new Rediska_Connection_Exec($this->_connection, $command);
        $exec->execute();

        $this->_isWatched = true;

        return $this;
    }
public function watch($keyOrKeys)
    {
        $this->_throwIfNotSupported('Watch', '2.1');

        $command = array('WATCH');

        if (!is_array($keyOrKeys)) {
            $keys = array($keyOrKeys);
        } else {
            $keys = $keyOrKeys;
        }

        foreach($keys as $key) {
            $command[] = $this->_rediska->getOption('namespace') . $key;
        }

        $exec = new Rediska_Connection_Exec($this->_connection, $command);
        $exec->execute();

        $this->_isWatched = true;

        return $this;
    }
Marks the given keys to be watched for conditional execution of a transaction.

@throws Rediska_Transaction_Exception
@param  $keyOrKeys Key or array of keys
@return Rediska_Transaction