concrete/src/Session/SessionFactory.php
protected function getMemcachedHandler(array $config)
    {
        // Create new memcached instance
        $memcached = $this->app->make(Memcached::class, [
            'CCM_SESSION',
            null,
        ]);

        $servers = array_get($config, 'servers', []);

        // Add missing servers
        foreach ($this->newMemcachedServers($memcached, $servers) as $server) {
            $memcached->addServer(
                array_get($server, 'host'),
                array_get($server, 'port'),
                array_get($server, 'weight')
            );
        }

        // Return a newly built handler
        return $this->app->make(MemcachedSessionHandler::class, [
            $memcached,
            ['prefix' => array_get($config, 'name') ?: 'CCM_SESSION'],
        ]);
    }
protected function getMemcachedHandler(array $config)
    {
        // Create new memcached instance
        $memcached = $this->app->make(Memcached::class, [
            'CCM_SESSION',
            null,
        ]);

        $servers = array_get($config, 'servers', []);

        // Add missing servers
        foreach ($this->newMemcachedServers($memcached, $servers) as $server) {
            $memcached->addServer(
                array_get($server, 'host'),
                array_get($server, 'port'),
                array_get($server, 'weight')
            );
        }

        // Return a newly built handler
        return $this->app->make(MemcachedSessionHandler::class, [
            $memcached,
            ['prefix' => array_get($config, 'name') ?: 'CCM_SESSION'],
        ]);
    }
protected function getMemcachedHandler ( array $ config ) { // Create new memcached instance $ memcached = $ this -> app -> make ( Memcached :: class , [ 'CCM_SESSION' , null , ] ) ; $ servers = array_get ( $ config , 'servers' , [ ] ) ; // Add missing servers foreach ( $ this -> newMemcachedServers ( $ memcached , $ servers ) as $ server ) { $ memcached -> addServer ( array_get ( $ server , 'host' ) , array_get ( $ server , 'port' ) , array_get ( $ server , 'weight' ) ) ; } // Return a newly built handler return $ this -> app -> make ( MemcachedSessionHandler :: class , [ $ memcached , [ 'prefix' => array_get ( $ config , 'name' ) ? : 'CCM_SESSION' ] , ] ) ; }
Return a built Memcached session handler.

@param array $config The `concrete.session` config item

@return \Symfony\Component\HttpFoundation\Session\Storage\Handler\MemcachedSessionHandler
Return a built Memcached session handler .