16 lines
333 B
PHP
16 lines
333 B
PHP
<?php
|
|
|
|
// TODO: ... this should validate the config and stuffs
|
|
class Config
|
|
{
|
|
public array $config;
|
|
|
|
public function __construct(string $path)
|
|
{
|
|
if (!file_exists($path))
|
|
{
|
|
throw new Exception("Could not find configuration file: $path");
|
|
}
|
|
$this->config = require $path;
|
|
}
|
|
} |