<?php

namespace App\Core;

use \InvalidArgumentException;

/**
 * TODO: this should validate the config and stuffs
 */
class Config
{
    /**
     * Should hold the validated config array
     */
    public array $config;

    public function __construct(string $path)
    {
        if (!file_exists($path))
        {
            throw new InvalidArgumentException("Could not find configuration file: $path");
        }
        $this->config = require $path;
    }
}