Definition at line 5 of file Config.php.
| static getConfig |
( |
|
$lang = null, |
|
|
|
$key = null, |
|
|
|
$defaultValue = null |
|
) |
| |
|
static |
Definition at line 44 of file Config.php.
46 $fetcher =
new self();
50 if (isset(self::$config[$_lang]))
51 return isset(self::$config[$_lang][$key]) ? self::$config[$_lang][$key] : $defaultValue;
52 $values = $fetcher->selects(array(
"lang" => $lang));
53 foreach ($values as $i)
54 self::$config[$_lang][$i->key] = $i->value;
56 return (isset(self::$config[$_lang][$key]) ? self::$config[$_lang][$key] : $defaultValue);
Definition at line 9 of file Config.php.
12 $result = self::$dbo->exec(
"CREATE TABLE IF NOT EXISTS `{$dbPrefix}config` (
13 `lang` VARCHAR(8) NULL,
14 `key` VARCHAR(64) NOT NULL,
18 if ($result ===
false)
19 throw new \Exception(get_class().
": ".self::$dbo->errorInfo()[2]);
20 self::setConfig(null,
"theme",
"default");
| static setConfig |
( |
|
$lang, |
|
|
|
$key, |
|
|
|
$value |
|
) |
| |
|
static |
Definition at line 24 of file Config.php.
26 $fetcher =
new self();
27 $data = $fetcher->selects(array(
"lang" => $lang,
"key" => $key));
33 $data->value = $value;
39 $data->value = $value;
The documentation for this class was generated from the following file: