Commit 6c98f5fa authored by Taylor Otwell's avatar Taylor Otwell

refactoring session class.

parent af4403ba
......@@ -28,31 +28,24 @@ class Session {
switch (Config::get('session.driver'))
{
case 'cookie':
static::$driver = new Session\Cookie;
break;
return static::$driver = new Session\Cookie;
case 'file':
static::$driver = new Session\File;
break;
return static::$driver = new Session\File;
case 'db':
static::$driver = new Session\DB;
break;
return static::$driver = new Session\DB;
case 'memcached':
static::$driver = new Session\Memcached;
break;
return static::$driver = new Session\Memcached;
case 'apc':
static::$driver = new Session\APC;
break;
return static::$driver = new Session\APC;
default:
throw new \Exception("Session driver [$driver] is not supported.");
}
}
return static::$driver;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment