MIOLO20
Carregando...
Procurando...
Nenhuma entrada encontrada
Referência à classe DriverManager

Membros públicos estáticos

static getConnection (array $params, Configuration $config=null, EventManager $eventManager=null)
 

Descrição detalhada

Factory for creating Doctrine\DBAL\Connection instances.

Autor
Roman Borschel roman.nosp@m.@cod.nosp@m.e-fac.nosp@m.tory.nosp@m..org
Desde
2.0

Definido na linha 30 do ficheiro DriverManager.php.

Documentação das funções

◆ getConnection()

static getConnection ( array $params,
Configuration $config = null,
EventManager $eventManager = null )
static

Creates a connection object based on the specified parameters. This method returns a Doctrine\DBAL\Connection which wraps the underlying driver connection.

$params must contain at least one of the following.

Either 'driver' with one of the following values: pdo_mysql pdo_sqlite pdo_pgsql pdo_oracle pdo_sqlsrv

OR 'driverClass' that contains the full class name (with namespace) of the driver class to instantiate.

Other (optional) parameters:

user (string): The username to use when connecting.

password (string): The password to use when connecting.

driverOptions (array): Any additional driver-specific options for the driver. These are just passed through to the driver.

pdo: You can pass an existing PDO instance through this parameter. The PDO instance will be wrapped in a Doctrine\DBAL\Connection.

wrapperClass: You may specify a custom wrapper class through the 'wrapperClass' parameter but this class MUST inherit from Doctrine\DBAL\Connection.

Parâmetros
array$paramsThe parameters.
Doctrine

DBAL\Configuration The configuration to use.

Parâmetros
Doctrine

Common\EventManager The event manager to use.

Retorna
Doctrine\DBAL\Connection

Definido na linha 94 do ficheiro DriverManager.php.


A documentação para esta classe foi gerada a partir do seguinte ficheiro: