PHP 클래스 Doctrine\DBAL\DriverManager

부터: 2.0
저자: Roman Borschel ([email protected])
파일 보기 프로젝트 열기: doctrine/dbal 1 사용 예제들

공개 메소드들

메소드 설명
getAvailableDrivers ( ) : array Returns the list of supported drivers.
getConnection ( array $params, Doctrine\DBAL\Configuration $config = null, Doctrine\Common\EventManager $eventManager = null ) : Doctrine\DBAL\Connection Creates a connection object based on the specified parameters.

비공개 메소드들

메소드 설명
__construct ( ) Private constructor. This class cannot be instantiated.
_checkParams ( array $params ) : void Checks the list of parameters.
normalizeDatabaseUrlPath ( string $urlPath ) : string Normalizes the given connection URL path.
parseDatabaseUrl ( array $params ) : array Extracts parts from a database URL, if present, and returns an updated list of parameters.
parseDatabaseUrlPath ( array $url, array $params ) : array Parses the given connection URL and resolves the given connection parameters.
parseDatabaseUrlQuery ( array $url, array $params ) : array Parses the query part of the given connection URL and resolves the given connection parameters.
parseDatabaseUrlScheme ( array $url, array $params ) : array Parses the scheme part from given connection URL and resolves the given connection parameters.
parseRegularDatabaseUrlPath ( array $url, array $params ) : array Parses the given regular connection URL and resolves the given connection parameters.
parseSqliteDatabaseUrlPath ( array $url, array $params ) : array Parses the given SQLite connection URL and resolves the given connection parameters.

메소드 상세

getAvailableDrivers() 공개 정적인 메소드

Returns the list of supported drivers.
public static getAvailableDrivers ( ) : array
리턴 array

getConnection() 공개 정적인 메소드

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_oci (unstable) pdo_sqlsrv pdo_sqlsrv mysqli sqlanywhere sqlsrv ibm_db2 (unstable) drizzle_pdo_mysql 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. driverClass: The driver class to use.
public static getConnection ( array $params, Doctrine\DBAL\Configuration $config = null, Doctrine\Common\EventManager $eventManager = null ) : Doctrine\DBAL\Connection
$params array The parameters.
$config Doctrine\DBAL\Configuration The configuration to use.
$eventManager Doctrine\Common\EventManager The event manager to use.
리턴 Doctrine\DBAL\Connection