| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php declare(strict_types=1); |
||
| 23 | public function __construct(string $adapter, array $dsnArray, string $username=null, string $password=null) |
||
| 24 | { |
||
| 25 | $class = __NAMESPACE__."\\Adapters\\$adapter"; |
||
| 26 | $adapterObject = new $class; |
||
| 27 | |||
| 28 | if ($adapterObject instanceof ConnectableInterface) |
||
| 29 | { |
||
| 30 | $adapterObject->setDsn($dsnArray); |
||
| 31 | $adapterObject->connect($username, $password); |
||
| 32 | } |
||
| 33 | |||
| 34 | $this->connection = $adapterObject->getConnection(); |
||
| 35 | } |
||
| 36 | |||
| 41 | } |