Documentation

VersionAwarePlatformDriver extends Driver

Contract for a driver that is able to create platform instances by version.

Doctrine uses different platform classes for different vendor versions to support the correct features and SQL syntax of each version. This interface should be implemented by drivers that are capable to do this distinction.

Tags
deprecated

All drivers will have to be aware of the server version in the next major release.

Table of Contents

Methods

connect()  : Connection
Attempts to create a connection with the database.
createDatabasePlatformForVersion()  : AbstractPlatform
Factory method for creating the appropriate platform instance for the given version.
getDatabasePlatform()  : AbstractPlatform
Gets the DatabasePlatform instance that provides all the metadata about the platform this driver connects to.
getExceptionConverter()  : ExceptionConverter
Gets the ExceptionConverter that can be used to convert driver-level exceptions into DBAL exceptions.
getSchemaManager()  : AbstractSchemaManager
Gets the SchemaManager that can be used to inspect and change the underlying database schema of the platform this driver connects to.

Methods

connect()

Attempts to create a connection with the database.

public connect(array<string, mixed> $params) : Connection
Parameters
$params : array<string, mixed>

All connection parameters.

Tags
psalm-param

Params $params All connection parameters.

throws
Exception
Return values
Connection

The database connection.

createDatabasePlatformForVersion()

Factory method for creating the appropriate platform instance for the given version.

public createDatabasePlatformForVersion(string $version) : AbstractPlatform
Parameters
$version : string

The platform/server version string to evaluate. This should be given in the notation the underlying database vendor uses.

Tags
throws
Exception

If the given version string could not be evaluated.

Return values
AbstractPlatform

getDatabasePlatform()

Gets the DatabasePlatform instance that provides all the metadata about the platform this driver connects to.

public getDatabasePlatform() : AbstractPlatform
Return values
AbstractPlatform

The database platform.


        
On this page

Search results