Conditions | 2 |
Paths | 2 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
20 | public function __construct(DBALConnection $connection) |
||
21 | { |
||
22 | var_dump([ |
||
|
|||
23 | 'host' => $connection->getHost(), |
||
24 | 'port' => $connection->getPort(), |
||
25 | 'dbname' => $connection->getDatabase(), |
||
26 | 'user' => $connection->getUsername(), |
||
27 | 'pass' => $connection->getPassword(), |
||
28 | ]); |
||
29 | $connection->connect(); |
||
30 | $conn = $connection->getWrappedConnection(); |
||
31 | if (!$conn instanceof PDO) { |
||
32 | throw new \Exception('DBAL Connection should be wrapped around PDO connection'); |
||
33 | } |
||
34 | |||
35 | $this->connection = $conn; |
||
36 | } |
||
37 | |||
47 |