1 pjaol 1.1 <?php
2
3 class Conf
4 {
5
6 static private $instance;
7 //singleton, use instance
8
9 private function __constructor () {}
10
11 function set ($name, $value)
12 {
13 $this->_conf[$name] = $value;
14 }
15 function get ($name)
16 {
17 return $this->_conf[$name];
18 }
19
20 static function instance()
21 {
22 pjaol 1.1 if(!Conf::$instance) {
23 Conf::$instance = new Conf();
24 }
25 return Conf::$instance;
26 }
27 }
28
29 ?>
|