コード例 #1
0
ファイル: Database.php プロジェクト: aburakovskiy/mibew
 /**
  * Destroy internal database object
  */
 public static function destroy()
 {
     if (!is_null(self::$instance)) {
         self::$instance->__destruct();
         self::$instance = null;
     }
 }
コード例 #2
0
ファイル: index.php プロジェクト: louisnorthmore/mangoswebv3
            // If file is cached
            if ($Core->isCached($Template['number'] . "_" . $ext . "." . $sub . "_" . $GLOBALS['user_cur_lang'])) {
                $Contents = $Core->getCache($Template['number'] . "_" . $ext . "." . $sub . "_" . $GLOBALS['user_cur_lang']);
                echo $Contents;
            } else {
                ob_start();
                include $template_file;
                $Contents = ob_get_flush();
                $Core->writeCache($Template['number'] . "_" . $ext . "." . $sub . "_" . $GLOBALS['user_cur_lang'], $Contents);
            }
            unset($Contents);
        } else {
            ob_start();
            include $template_file;
            ob_end_flush();
        }
        // === End cache system, Load the footer === //
        // Set our time end, so we can see how fast the page loaded.
        define('TIME_END', microtime(1));
        define('PAGE_LOAD_TIME', TIME_END - TIME_START);
        include $Template['footer'];
    }
}
/***************************************************************
 * End Page Loading
 ***************************************************************/
// Close all DB Connections
$DB->__destruct();
$CDB->__destruct();
$WDB->__destruct();
コード例 #3
0
 public function __destruct()
 {
     parent::__destruct();
 }
コード例 #4
0
function runSQL2($_query, $param = array())
{
    try {
        $_database = new Database("pdo");
        $retorno = $_database->execute($_query, $param);
        $_database->__destruct();
        return $retorno;
    } catch (Exception $e) {
        echo "<!--";
        echo "#" . $e->getMessage() . ": Algum erro ocorreu.";
        echo "<br />";
        print_r($e->getTrace());
        echo "-->";
        exit;
    }
}