PdoSessionFactory
session slot factory for this package’s PdoSessionPersistence.
yaml session: class: Quiote\Session\Pdo\PdoSessionFactory params: database: sessions table: session
Core ships an equivalent pair (PdoSessionFactory over PdoSessionPersistence) with no extra dependency, and that is the one to reach for in a new application. This exists so an application already requiring this package keeps working.
Synopsis
Section titled “Synopsis”final class PdoSessionFactory implements SessionFactoryInterface
| Implements | SessionFactoryInterface |
| Since | 3.0.0 |
| Source | PdoSessionFactory.php |
Methods
Section titled “Methods”| Method | Description |
|---|---|
createPersistence(Context $context, array $parameters): SessionPersistenceInterface | Builds a PdoSessionPersistence over a connection from the application’s database manager. |
createPersistence()
Section titled “createPersistence()”public function createPersistence(Context $context, array $parameters): SessionPersistenceInterface
Builds a PdoSessionPersistence over a connection from the application’s database manager.
The database parameter names the connection; omitting it takes the default one. table defaults to session.
| Parameter | Type | Description |
|---|---|---|
$context | Context | |
$parameters | array |
Returns SessionPersistenceInterface
| Throws | When |
|---|---|
StorageException | if no database manager is bound (core.use_database off) or the named connection is not a PDO handle. |