From 8056e0d1a70787e294a67f327d2c581d169fecdb Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Fri, 8 Jul 2011 09:48:01 -0700 Subject: [PATCH] Moved Session\Factory functionality into the Session class. --- system/session.php | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/system/session.php b/system/session.php index 644345d6..48ff3664 100644 --- a/system/session.php +++ b/system/session.php @@ -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;