0.9.0 - the ZapV version updated to current php standards. Brave search used, while Bing and Google search api are deprecated
This commit is contained in:
parent
3d4298fe8b
commit
4ddaddda3d
31 changed files with 1778 additions and 1 deletions
35
conf/Config.class.php
Executable file
35
conf/Config.class.php
Executable file
|
|
@ -0,0 +1,35 @@
|
|||
<?php
|
||||
/**
|
||||
* Singleton configuration class
|
||||
* Register configuration directives with this class
|
||||
*/
|
||||
class Config {
|
||||
private static $instance = null;
|
||||
|
||||
private $config = array();
|
||||
|
||||
private function __construct() {
|
||||
}
|
||||
|
||||
public static function getInstance() {
|
||||
if (self::$instance === null) {
|
||||
$clazz = __CLASS__;
|
||||
self::$instance = new $clazz();
|
||||
}
|
||||
return self::$instance;
|
||||
}
|
||||
|
||||
public function register($key, $value) {
|
||||
$this->config[$key] = $value;
|
||||
return;
|
||||
}
|
||||
|
||||
public function retrieve($key) {
|
||||
if (isset($this->config[$key])) {
|
||||
return $this->config[$key];
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue