Initial commit
Couldnt keep the history unfortunately.
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Classes;
|
||||
|
||||
class Config {
|
||||
|
||||
protected static $config;
|
||||
|
||||
//-------------------------------------//
|
||||
|
||||
public static function load(): void
|
||||
{
|
||||
if (file_exists('../config.php')) {
|
||||
self::$config = require_once '../config.php';
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------//
|
||||
|
||||
public static function c(string $index = ''): string
|
||||
{
|
||||
if (_exists(self::$config, $index)) {
|
||||
return self::$config[$index];
|
||||
}
|
||||
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user