Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Config
- {
- private static $config = null;
- private $host = 'localhost';
- private $userName = 'root';
- private $password = '';
- private $database = 'keep_lab';
- private $lcTimeNames = 'ru_RU';
- private $encoding = 'utf8';
- public static function getConfig()
- {
- if (self::$config === null) {
- self::$config = new self;
- }
- return self::$config;
- }
- }
- public static function getDB()
- {
- if (self::$db === null) {
- self::$db = new self(Config::getConfig());
- }
- return self::$db;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement