| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 15 | public function __construct(Entity $entity) |
||
| 16 | { |
||
| 17 | parent::__construct($entity, false); |
||
| 18 | |||
| 19 | $this->getDriver()->getDb()->setDbUser($_COOKIE["username"]); |
||
| 20 | $this->getDriver()->getDb()->setDbpass($_COOKIE["password"]); |
||
| 21 | |||
| 22 | if (!$this->getDriver()->getDb()->connect()) |
||
| 23 | { |
||
| 24 | $errors = $this->getDriver()->getDb()->getErrors(); |
||
| 25 | throw new \Exception(array_shift($errors)); |
||
| 26 | } |
||
| 28 | } |