Definition at line 5 of file Config.php.
| static getConfig |
( |
|
$lang = null, |
|
|
|
$key = null, |
|
|
|
$defaultValue = null |
|
) |
| |
|
static |
Definition at line 43 of file Config.php.
45 $fetcher =
new self();
46 if (isset(self::$config[$lang]))
48 $values = $fetcher->selects(array(
"lang" => $lang));
49 foreach ($values as $i)
50 self::$config[$lang][$i->key] = $i->value;
52 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]);
| static setConfig |
( |
|
$lang, |
|
|
|
$key, |
|
|
|
$value |
|
) |
| |
|
static |
Definition at line 23 of file Config.php.
25 $fetcher =
new self();
26 $data = $fetcher->selects(array(
"lang" => $lang,
"key" => $key));
32 $data->value = $value;
38 $data->value = $value;
The documentation for this class was generated from the following file: