Total Complexity | 4 |
Total Lines | 39 |
Duplicated Lines | 0 % |
Coverage | 14.29% |
Changes | 0 |
1 | <?php |
||
14 | class Driver extends AbstractOracleDriver |
||
15 | { |
||
16 | /** |
||
17 | * {@inheritdoc} |
||
18 | */ |
||
19 | public function connect(array $params, $username = null, $password = null, array $driverOptions = []) |
||
20 | { |
||
21 | try { |
||
22 | return new OCI8Connection( |
||
23 | (string) $username, |
||
24 | (string) $password, |
||
25 | $this->_constructDsn($params), |
||
26 | $params['charset'] ?? '', |
||
27 | $params['sessionMode'] ?? OCI_DEFAULT, |
||
28 | $params['persistent'] ?? false |
||
29 | ); |
||
30 | } catch (OCI8Exception $e) { |
||
31 | throw DBALException::driverException($this, $e); |
||
32 | } |
||
33 | } |
||
34 | |||
35 | /** |
||
36 | * Constructs the Oracle DSN. |
||
37 | * |
||
38 | * @param mixed[] $params |
||
39 | * |
||
40 | * @return string The DSN. |
||
41 | */ |
||
42 | protected function _constructDsn(array $params) |
||
45 | } |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | 26 | public function getName() |
|
53 | } |
||
54 | } |
||
55 |