library/Rediska/Serializer.php
public function setAdapter($adapter)
    {
        if (is_object($adapter)) {
            $this->_adapter = $adapter;
        } else if (in_array($adapter, array('phpSerialize', 'json', 'toString'))) {
            $adapter = ucfirst($adapter);
            $className = "Rediska_Serializer_Adapter_$adapter";
            $this->_adapter = new $className;
        } else {
            if (!@class_exists($adapter)) {
                throw new Rediska_Serializer_Exception("Serializer adapter '$adapter' not found. You need include it before or setup autoload.");
            }
            $this->_adapter = new $adapter;
        }

        if (!$this->_adapter instanceof Rediska_Serializer_Adapter_Interface) {
            throw new Rediska_Serializer_Exception("'$adapter' must implement Rediska_Serializer_Adapter_Interface");
        }

        return $this;
    }
public function setAdapter($adapter)
    {
        if (is_object($adapter)) {
            $this->_adapter = $adapter;
        } else if (in_array($adapter, array('phpSerialize', 'json', 'toString'))) {
            $adapter = ucfirst($adapter);
            $className = "Rediska_Serializer_Adapter_$adapter";
            $this->_adapter = new $className;
        } else {
            if (!@class_exists($adapter)) {
                throw new Rediska_Serializer_Exception("Serializer adapter '$adapter' not found. You need include it before or setup autoload.");
            }
            $this->_adapter = new $adapter;
        }

        if (!$this->_adapter instanceof Rediska_Serializer_Adapter_Interface) {
            throw new Rediska_Serializer_Exception("'$adapter' must implement Rediska_Serializer_Adapter_Interface");
        }

        return $this;
    }
Set adapter

@param $adapter
@return Rediska_Serializer