[HttpFoudation] Add ability to configure sqlite session storage.
This commit is contained in:
parent
4c1cea7093
commit
7f8c293070
@ -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 @@ class NativeSqliteSessionStorage extends AbstractSessionStorage
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user