class Driver extends AbstractOracleDriver (View source)

A Doctrine DBAL driver for the Oracle OCI8 PHP extensions.

Methods

convertException(string $message, DriverException $exception)

Converts a given DBAL driver exception into a standardized DBAL driver exception.

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.

string
getEasyConnectString(array $params)

Returns an appropriate Easy Connect String for the given parameters.

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

Attempts to create a connection with the database.

string
_constructDsn(array $params)

Constructs the Oracle DSN.

string
getName()

Gets the name of the driver.

Details

DriverException convertException(string $message, DriverException $exception)

Converts a given DBAL driver exception into a standardized DBAL driver exception.

It evaluates the vendor specific error code and SQLSTATE and transforms it into a unified {@link Doctrine\DBAL\Exception\DriverException} subclass.

Parameters

string $message The DBAL exception message to use.
DriverException $exception The DBAL driver exception to convert.

Return Value

DriverException An instance of one of the DriverException subclasses.

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

protected string getEasyConnectString(array $params)

Returns an appropriate Easy Connect String for the given parameters.

Parameters

array $params The connection parameters to return the Easy Connect String for.

Return Value

string

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.

protected string _constructDsn(array $params)

Constructs the Oracle DSN.

Parameters

array $params

Return Value

string The DSN.

string getName()

Gets the name of the driver.

Return Value

string The name of the driver.