You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
458 B
29 lines
458 B
<?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 ''; |
|
} |
|
|
|
}
|
|
|