ConnectionFactory
in package
Tags
Table of Contents
- $initialized : bool
- $typesConfig : array<string|int, array<string|int, mixed>>
- __construct() : mixed
- createConnection() : Connection
- Create a connection by name.
- getDatabasePlatform() : AbstractPlatform
- Try to get the database platform.
- initializeTypes() : void
- initialize the types
Properties
$initialized
private
bool
$initialized
= false
$typesConfig
private
array<string|int, array<string|int, mixed>>
$typesConfig
= []
Methods
__construct()
public
__construct(array<string|int, array<string|int, mixed>> $typesConfig) : mixed
Parameters
- $typesConfig : array<string|int, array<string|int, mixed>>
Return values
mixed —createConnection()
Create a connection by name.
public
createConnection(array<string|int, mixed> $params[, Configuration|null $config = null ][, EventManager|null $eventManager = null ][, array<string, string> $mappingTypes = [] ]) : Connection
Parameters
- $params : array<string|int, mixed>
- $config : Configuration|null = null
- $eventManager : EventManager|null = null
- $mappingTypes : array<string, string> = []
Tags
Return values
Connection —getDatabasePlatform()
Try to get the database platform.
private
getDatabasePlatform(Connection $connection) : AbstractPlatform
This could fail if types should be registered to an predefined/unused connection and the platform version is unknown. For details have a look at DoctrineBundle issue #673.
Parameters
- $connection : Connection
Tags
Return values
AbstractPlatform —initializeTypes()
initialize the types
private
initializeTypes() : void