Skip to content
Browse files

[HttpFoudation] Add ability to configure sqlite session storage.

  • Loading branch information...
1 parent 4c1cea7 commit 7f8c293070875a407e57521f37ce88341e90f276 Drak committed Feb 22, 2012
View
22 src/Symfony/Component/HttpFoundation/Session/Storage/NativeSqliteSessionStorage.php
@@ -28,8 +28,8 @@ class NativeSqliteSessionStorage extends AbstractSessionStorage
/**
* Constructor.
*
- * @param string $dbPath Path to SQLite database file.
- * @param array $options Session configuration options.
+ * @param string $dbPath Path to SQLite database file.
+ * @param array $options Session configuration options.
*
* @see AbstractSessionStorage::__construct()
*/
@@ -51,4 +51,22 @@ protected function registerSaveHandlers()
ini_set('session.save_handler', 'sqlite');
ini_set('session.save_path', $this->dbPath);
}
+
+ /**
+ * {@inheritdoc}
+ *
+ * Sets any values sqlite ini values.
+ *
+ * @see http://php.net/sqlite.configuration
+ */
+ protected function setOptions(array $options)
+ {
+ foreach ($options as $key => $value) {
+ if (in_array($key, array('sqlite.assoc_case'))) {
+ ini_set($key, $value);
+ }
+ }
+
+ parent::setOptions($options);
+ }
}

0 comments on commit 7f8c293

Please sign in to comment.
Something went wrong with that request. Please try again.