| Total Complexity | 4 |
| Total Lines | 31 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 5 | class Config |
||
| 6 | { |
||
| 7 | private $settings = []; |
||
| 8 | private static $_instance; |
||
| 9 | |||
| 10 | /** |
||
| 11 | *Get the configuration variables |
||
| 12 | * @param string $file ex: __DIR__. '/config/config.php' |
||
| 13 | * @return Config |
||
| 14 | */ |
||
| 15 | public static function getInstance(string $file): Config |
||
| 21 | } |
||
| 22 | |||
| 23 | public function __construct(string $file) |
||
| 26 | } |
||
| 27 | |||
| 28 | /** |
||
| 29 | * Access to a configuration variable |
||
| 30 | * @param string $key |
||
| 31 | * @return mixed |
||
| 32 | */ |
||
| 33 | public function get(string $key) |
||
| 38 |