static function getInstance() { if (self::$instance == NULL) { self::$instance = new Gloo_Config(); } return self::$instance; }
private function init_db() { $this->mysqli = new mysqli(Gloo_Config::getInstance()->mysql_host(), Gloo_Config::getInstance()->mysql_user(), Gloo_Config::getInstance()->mysql_password(), Gloo_Config::getInstance()->mysql_db()); if (mysqli_connect_errno()) { trigger_error(mysqli_connect_error(), E_USER_ERROR); exit(1); } }
function __construct() { //level is an integer $logfile = $_SERVER['GLOO_WEB_DIR'] . "gloov2.log"; //open for writing only $this->fhandle = fopen($logfile, "a+"); $this->sysLevel = Gloo_Config::getInstance()->log_level(); $this->priority = $this->level_to_priority($this->sysLevel); $this->isDebug = Gloo_Config::getInstance()->is_debug(); }