You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
435 B
PHTML
25 lines
435 B
PHTML
8 years ago
|
<?php
|
||
|
// Some useful functions
|
||
|
|
||
|
use Engelsystem\Config\Config;
|
||
|
|
||
|
/**
|
||
|
* Get or set config values
|
||
|
*
|
||
|
* @param string|array $key
|
||
|
* @param mixed $default
|
||
|
* @return mixed|Config
|
||
|
*/
|
||
|
function config($key = null, $default = null)
|
||
|
{
|
||
|
if (empty($key)) {
|
||
|
return Config::getInstance();
|
||
|
}
|
||
|
|
||
|
if (is_array($key)) {
|
||
|
Config::getInstance()->set($key);
|
||
|
}
|
||
|
|
||
|
return Config::getInstance()->get($key, $default);
|
||
|
}
|