Exemplo n.º 1
0
 static function getInstance()
 {
     if (self::$instance == NULL) {
         self::$instance = new Gloo_Config();
     }
     return self::$instance;
 }
Exemplo n.º 2
0
Arquivo: DB.php Projeto: rjha/gloov2
 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);
     }
 }
Exemplo n.º 3
0
 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();
 }