Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Config
- {
- public static $obj;
- public static function getObj()
- {
- if (!isset(self::$obj)) {
- return self::$obj = new self;
- }
- return self::$obj;
- }
- public function setDbconnect()
- {
- $cfg = (include __DIR__ . '/../config.php')['db'];
- foreach ($cfg as $key => $value){
- $this->$key = $value;
- }
- }
- private function __construct()
- {
- }
- private function __clone()
- {
- }
- private function __wakeup()
- {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement