interfaceSessionFactory
interface SessionFactory
Factory for creating Session instances configured for a specific database platform.
Each platform package provides a concrete implementation (e.g. MySqlSessionFactory, PostgresSessionFactory, SqliteSessionFactory).
Methods§
public function create(ConnectionInterface $connection, ZtdConfig $config): SessionCreate a Session pre-configured for the platform.
The implementation MUST:
- Reflect all existing table schemas from the database via SchemaReflector
- Return a Session with isEnabled() === true
- Return a Session with an empty ShadowStore
If schema reflection fails (connection error, permission error), the implementation MUST propagate the exception. Partial schema loading is NOT permitted.
Parameters
$connection | ConnectionInterface | An active database connection. |
$config | ZtdConfig | ZTD configuration. |
Returns
Session A fully configured session.Throws
DatabaseException If schema reflection fails.Test cases 1§
Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.
Other tests reaching this symbol 1
FakeSessionFactorycalls