class Driver extends AbstractSQLServerDriver (View source)

Driver for ext/sqlsrv.

Methods

createDatabasePlatformForVersion(string $version)

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

string
getDatabase(Connection $conn)

Gets the name of the database connected to for this driver.

getDatabasePlatform()

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

getSchemaManager(Connection $conn)

Gets the SchemaManager that can be used to inspect and change the underlying database schema of the platform this driver connects to.

connect(array $params, string|null $username = null, string|null $password = null, array $driverOptions = [])

Attempts to create a connection with the database.

string
getName()

Gets the name of the driver.

Details

AbstractPlatform createDatabasePlatformForVersion(string $version)

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

Parameters

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

Return Value

AbstractPlatform

Exceptions

DBALException If the given version string could not be evaluated.

string getDatabase(Connection $conn)

Gets the name of the database connected to for this driver.

Parameters

Connection $conn

Return Value

string The name of the database.

AbstractPlatform getDatabasePlatform()

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

Return Value

AbstractPlatform The database platform.

AbstractSchemaManager getSchemaManager(Connection $conn)

Gets the SchemaManager that can be used to inspect and change the underlying database schema of the platform this driver connects to.

Parameters

Connection $conn

Return Value

AbstractSchemaManager

Connection connect(array $params, string|null $username = null, string|null $password = null, array $driverOptions = [])

Attempts to create a connection with the database.

Parameters

array $params All connection parameters passed by the user.
string|null $username The username to use when connecting.
string|null $password The password to use when connecting.
array $driverOptions The driver options to use when connecting.

Return Value

Connection The database connection.

string getName()

Gets the name of the driver.

Return Value

string The name of the driver.