protected function createMemcacheDriver()
    {
        $serverArray    = $this->config['servers'];
        $persistent     = boolval($this->config['persistent']);
        $name           = trim($this->config['server_name']);
        $prefix         = trim($this->config['prefix']);
        $expireTime     = intval($this->config['lifetime']);

        if ($persistent && (strlen($name) > 0)) {
            $memcached  = new Memcached($name);
        } else {
            $memcached  = new Memcached();
        }

        if (!sizeof($memcached->getServerList())) {
            $memcached->addServers($serverArray);
        }

        $store = new MemcachedStore($memcached, $prefix);
        return new CacheSessionHandler($store, $expireTime);
    }
protected function createMemcacheDriver()
    {
        $serverArray    = $this->config['servers'];
        $persistent     = boolval($this->config['persistent']);
        $name           = trim($this->config['server_name']);
        $prefix         = trim($this->config['prefix']);
        $expireTime     = intval($this->config['lifetime']);

        if ($persistent && (strlen($name) > 0)) {
            $memcached  = new Memcached($name);
        } else {
            $memcached  = new Memcached();
        }

        if (!sizeof($memcached->getServerList())) {
            $memcached->addServers($serverArray);
        }

        $store = new MemcachedStore($memcached, $prefix);
        return new CacheSessionHandler($store, $expireTime);
    }
protected function createMemcacheDriver ( ) { $ serverArray = $ this -> config [ 'servers' ] ; $ persistent = boolval ( $ this -> config [ 'persistent' ] ) ; $ name = trim ( $ this -> config [ 'server_name' ] ) ; $ prefix = trim ( $ this -> config [ 'prefix' ] ) ; $ expireTime = intval ( $ this -> config [ 'lifetime' ] ) ; if ( $ persistent && ( strlen ( $ name ) > 0 ) ) { $ memcached = new Memcached ( $ name ) ; } else { $ memcached = new Memcached ( ) ; } if ( ! sizeof ( $ memcached -> getServerList ( ) ) ) { $ memcached -> addServers ( $ serverArray ) ; } $ store = new MemcachedStore ( $ memcached , $ prefix ) ; return new CacheSessionHandler ( $ store , $ expireTime ) ; }
create memcached session driver
throw SessionException when session save path is not exists

@return CacheSessionHandler
create memcached session driver throw SessionException when session save path is not exists