| Conditions | 3 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Comodojo\Extender\Components; |
||
| 33 | public static function init(Configuration $configuration) { |
||
| 34 | |||
| 35 | $dbspecs = $configuration->get('database'); |
||
| 36 | |||
| 37 | if ( empty($dbspecs) || !is_array($dbspecs) ) throw new Exception("Empty database connection parameters"); |
||
| 38 | |||
| 39 | $config = new DoctrineConfiguration(); |
||
| 40 | |||
| 41 | return DriverManager::getConnection($dbspecs, $config); |
||
| 42 | |||
| 43 | } |
||
| 44 | |||
| 46 |