code/user/session/abstract.php
public function setHandler($handler, $config = array())
    {
        if (!($handler instanceof UserSessionHandlerInterface))
        {
            if (is_string($handler) && strpos($handler, '.') === false)
            {
                $identifier = $this->getIdentifier()->toArray();
                $identifier['path'] = array('session', 'handler');
                $identifier['name'] = $handler;
                // reset the handler
                $handler = $identifier;
            }

            $identifier = $this->getIdentifier($handler);

            //Set the configuration
            $identifier->getConfig()->append($config);

            $handler = $identifier;
        }

        $this->_handler = $handler;
        return $this;
    }
public function setHandler($handler, $config = array())
    {
        if (!($handler instanceof UserSessionHandlerInterface))
        {
            if (is_string($handler) && strpos($handler, '.') === false)
            {
                $identifier = $this->getIdentifier()->toArray();
                $identifier['path'] = array('session', 'handler');
                $identifier['name'] = $handler;
                // reset the handler
                $handler = $identifier;
            }

            $identifier = $this->getIdentifier($handler);

            //Set the configuration
            $identifier->getConfig()->append($config);

            $handler = $identifier;
        }

        $this->_handler = $handler;
        return $this;
    }
public function setHandler ( $ handler , $ config = array ( ) ) { if ( ! ( $ handler instanceof UserSessionHandlerInterface ) ) { if ( is_string ( $ handler ) && strpos ( $ handler , '.' ) === false ) { $ identifier = $ this -> getIdentifier ( ) -> toArray ( ) ; $ identifier [ 'path' ] = array ( 'session' , 'handler' ) ; $ identifier [ 'name' ] = $ handler ; // reset the handler $ handler = $ identifier ; } $ identifier = $ this -> getIdentifier ( $ handler ) ; //Set the configuration $ identifier -> getConfig ( ) -> append ( $ config ) ; $ handler = $ identifier ; } $ this -> _handler = $ handler ; return $ this ; }
Method to set a session handler object

@param mixed $handler An object that implements UserSessionHandlerInterface, ObjectIdentifier object
or valid identifier string
@param array $config An optional associative array of configuration settings
@return $this
Method to set a session handler object