Moved Session\Factory functionality into the Session class.
This commit is contained in:
parent
b1b2b932cc
commit
8056e0d1a7
|
@ -25,7 +25,27 @@ public static function driver()
|
|||
{
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue