public function create(OptionsBag $sessionOptions)
    {
        $options = $this->parseOptions($sessionOptions);

        $connections = $this->parse($sessionOptions);

        $persistentId = null;
        if ($options['persistent']) {
            $persistentId = $this->parsePersistentId($connections, $options, $sessionOptions);
        }

        $class = $this->class;
        /** @var Memcached $memcached */
        $memcached = new $class(
            $persistentId,
            function (Memcached $memcached) use ($connections, $options) {
                $this->configure($memcached, $connections, $options);
            }
        );

        return $memcached;
    }
public function create(OptionsBag $sessionOptions)
    {
        $options = $this->parseOptions($sessionOptions);

        $connections = $this->parse($sessionOptions);

        $persistentId = null;
        if ($options['persistent']) {
            $persistentId = $this->parsePersistentId($connections, $options, $sessionOptions);
        }

        $class = $this->class;
        /** @var Memcached $memcached */
        $memcached = new $class(
            $persistentId,
            function (Memcached $memcached) use ($connections, $options) {
                $this->configure($memcached, $connections, $options);
            }
        );

        return $memcached;
    }
public function create ( OptionsBag $ sessionOptions ) { $ options = $ this -> parseOptions ( $ sessionOptions ) ; $ connections = $ this -> parse ( $ sessionOptions ) ; $ persistentId = null ; if ( $ options [ 'persistent' ] ) { $ persistentId = $ this -> parsePersistentId ( $ connections , $ options , $ sessionOptions ) ; } $ class = $ this -> class ; /** @var Memcached $memcached */ $ memcached = new $ class ( $ persistentId , function ( Memcached $ memcached ) use ( $ connections , $ options ) { $ this -> configure ( $ memcached , $ connections , $ options ) ; } ) ; return $ memcached ; }
Creates a Memcached instance from the session options.

@param OptionsBag $sessionOptions

@return Memcached
Creates a Memcached instance from the session options .