Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace App;
- class Config
- {
- private static $single;
- protected $host = 'localhost';
- protected $dbname = 'NewsSky';
- protected $user = 'root';
- protected $password = '';
- function getDbHost()
- {
- return $this->host;
- }
- function getDbName()
- {
- return $this->dbname;
- }
- public function getDbUser()
- {
- return $this->user;
- }
- public function getDbPass()
- {
- return $this->password;
- }
- public function getSingle()
- {
- if (self::$single === null){
- $class = __CLASS__;
- self::$single = new Config();
- return self::$single;
- }
- else
- return self::$single;
- }
- private function __construct(){}
- private function __clone(){}
- private function __wakeup(){}
- }
Add Comment
Please, Sign In to add comment