Commit 8056e0d1 authored by Taylor Otwell's avatar Taylor Otwell

Moved Session\Factory functionality into the Session class.

parent b1b2b932
......@@ -25,7 +25,27 @@ class Session {
{
if (is_null(static::$driver))
{
static::$driver = Session\Factory::make(Config::get('session.driver'));
switch (Config::get('session.driver'))
{
case 'file':
static::$driver = new Session\Driver\File;
break;
case 'db':
static::$driver = new Session\Driver\DB;
break;
case 'memcached':
static::$driver = new Session\Driver\Memcached;
break;
case 'apc':
static::$driver = new Session\Driver\APC;
break;
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