summaryrefslogtreecommitdiff
path: root/src/Http/SessionServiceProvider.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Http/SessionServiceProvider.php')
-rw-r--r--src/Http/SessionServiceProvider.php17
1 files changed, 3 insertions, 14 deletions
diff --git a/src/Http/SessionServiceProvider.php b/src/Http/SessionServiceProvider.php
index 66ff18cc..c2e09624 100644
--- a/src/Http/SessionServiceProvider.php
+++ b/src/Http/SessionServiceProvider.php
@@ -4,8 +4,8 @@ namespace Engelsystem\Http;
use Engelsystem\Config\Config;
use Engelsystem\Container\ServiceProvider;
+use Engelsystem\Http\SessionHandlers\DatabaseHandler;
use Symfony\Component\HttpFoundation\Session\Session;
-use Symfony\Component\HttpFoundation\Session\Storage\Handler\PdoSessionHandler;
use Symfony\Component\HttpFoundation\Session\Storage\MockArraySessionStorage;
use Symfony\Component\HttpFoundation\Session\Storage\NativeSessionStorage;
use Symfony\Component\HttpFoundation\Session\Storage\SessionStorageInterface;
@@ -45,20 +45,9 @@ class SessionServiceProvider extends ServiceProvider
$sessionConfig = $config->get('session');
$handler = null;
- $driver = $sessionConfig['driver'];
-
- switch ($driver) {
+ switch ($sessionConfig['driver']) {
case 'pdo':
- $handler = $this->app->make(PdoSessionHandler::class, [
- 'pdoOrDsn' => $this->app->get('db.pdo'),
- 'options' => [
- 'db_table' => 'sessions',
- 'db_id_col' => 'id',
- 'db_data_col' => 'payload',
- 'db_lifetime_col' => 'lifetime',
- 'db_time_col' => 'last_activity',
- ],
- ]);
+ $handler = $this->app->make(DatabaseHandler::class);
break;
}