src/Core/Container.php
protected function initSession()
    {
        $config = $this['session'];

        switch ($config['type']) {
            case 'files':
                $this['session.handler'] = function ($container) {
                    $config = $container['session'];
                    return new NativeFileSessionHandler($config['path']);
                };
                break;
            case 'memcache':
                $this['session.handler'] = function ($container) {
                    $config = $container['session'];
                    $path = explode(':', $config['path']);

                    $memcache = new \Memcache();
                    $memcache->connect($path[0], $path[1]);
                    return new MemcacheSessionHandler($memcache, $config['handler_options']);
                };
                break;
            case 'memcached':
                $this['session.handler'] = function ($container) {
                    $config = $container['session'];
                    $path = explode(':', $config['path']);

                    $memcached = new \Memcached();
                    $memcached->addServer($path[0], $path[1]);
                    return new MemcachedSessionHandler($memcached, $config['handler_options']);
                };
                break;
        }

        $this['session.storage'] = function ($container) {
            $config = $container['session'];
            return new NativeSessionStorage($config['options'], $container['session.handler']);
        };

        $this['session.session'] = function ($container) {
            return new Session($container['session.storage']);
        };
    }
protected function initSession()
    {
        $config = $this['session'];

        switch ($config['type']) {
            case 'files':
                $this['session.handler'] = function ($container) {
                    $config = $container['session'];
                    return new NativeFileSessionHandler($config['path']);
                };
                break;
            case 'memcache':
                $this['session.handler'] = function ($container) {
                    $config = $container['session'];
                    $path = explode(':', $config['path']);

                    $memcache = new \Memcache();
                    $memcache->connect($path[0], $path[1]);
                    return new MemcacheSessionHandler($memcache, $config['handler_options']);
                };
                break;
            case 'memcached':
                $this['session.handler'] = function ($container) {
                    $config = $container['session'];
                    $path = explode(':', $config['path']);

                    $memcached = new \Memcached();
                    $memcached->addServer($path[0], $path[1]);
                    return new MemcachedSessionHandler($memcached, $config['handler_options']);
                };
                break;
        }

        $this['session.storage'] = function ($container) {
            $config = $container['session'];
            return new NativeSessionStorage($config['options'], $container['session.handler']);
        };

        $this['session.session'] = function ($container) {
            return new Session($container['session.storage']);
        };
    }
TODO: Added MongoDB, Redis, PDO