summaryrefslogtreecommitdiff
path: root/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver.php
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/doctrine/dbal/src/Driver/AbstractOracleDriver.php')
-rw-r--r--vendor/doctrine/dbal/src/Driver/AbstractOracleDriver.php38
1 files changed, 38 insertions, 0 deletions
diff --git a/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver.php b/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver.php
new file mode 100644
index 0000000..cf56cfa
--- /dev/null
+++ b/vendor/doctrine/dbal/src/Driver/AbstractOracleDriver.php
@@ -0,0 +1,38 @@
1<?php
2
3declare(strict_types=1);
4
5namespace Doctrine\DBAL\Driver;
6
7use Doctrine\DBAL\Driver;
8use Doctrine\DBAL\Driver\AbstractOracleDriver\EasyConnectString;
9use Doctrine\DBAL\Driver\API\ExceptionConverter as ExceptionConverterInterface;
10use Doctrine\DBAL\Driver\API\OCI\ExceptionConverter;
11use Doctrine\DBAL\Platforms\OraclePlatform;
12use Doctrine\DBAL\ServerVersionProvider;
13
14/**
15 * Abstract base implementation of the {@see Driver} interface for Oracle based drivers.
16 */
17abstract class AbstractOracleDriver implements Driver
18{
19 public function getDatabasePlatform(ServerVersionProvider $versionProvider): OraclePlatform
20 {
21 return new OraclePlatform();
22 }
23
24 public function getExceptionConverter(): ExceptionConverterInterface
25 {
26 return new ExceptionConverter();
27 }
28
29 /**
30 * Returns an appropriate Easy Connect String for the given parameters.
31 *
32 * @param array<string, mixed> $params The connection parameters to return the Easy Connect String for.
33 */
34 protected function getEasyConnectString(array $params): string
35 {
36 return (string) EasyConnectString::fromConnectionParameters($params);
37 }
38}