本文整理汇总了PHP中Trace::reg_var方法的典型用法代码示例。如果您正苦于以下问题:PHP Trace::reg_var方法的具体用法?PHP Trace::reg_var怎么用?PHP Trace::reg_var使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Trace
的用法示例。
在下文中一共展示了Trace::reg_var方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Page
require_once PATH_CLASSES . 'Basic.class.php';
require_once PATH_CLASSES . 'Page.class.php';
require_once PATH_CLASSES . 'Lang.class.php';
require_once PATH_CLASSES . 'FStable.class.php';
/******************* Load Page (DB, Func, conf, page) *************************/
Trace::add_step(__FILE__, "Create DB object");
$Page = new Page($conf);
/************************* Load User Pref Lang ********************************/
Trace::add_step(__FILE__, "Load Language Dictionary");
if (isset($Page::$conf["general"]["uselang"]) && is_string($Page::$conf["general"]["uselang"])) {
require_once PATH_LANG . $Page::$conf["general"]["uselang"] . '.php';
}
Lang::load($Lang);
/*********************** Set global shared variables ***************************/
$vglob = array("req_secure" => false);
Trace::reg_var('Load VGlobals', $vglob);
/****************************** Page Target ***********************************/
$Page->target();
Trace::add_step(__FILE__, "Set page target", $Page->target);
/****************************** Page Loader ***********************************/
switch ($Page->target) {
case "api":
Trace::add_step(__FILE__, "Load secure api");
if ($vglob["req_secure"]) {
}
break;
case "home":
default:
Trace::add_step(__FILE__, "Load page home");
$Page->template = "pages/home.css";
include_once PATH_PAGES . "home.php";
示例2: array
$Page->description = Lang::P("home_desc", false);
$Page->keywords = Lang::P("home_keys", false);
//Set Page Variables:
$_view = $Page->Func->synth($_GET, array("view"))["view"];
$Page->variable("load-view", !empty($_view) && ($_view === "debugger" || $_view === "process" || $_view === "settings" || $_view === "server") ? $_view : "settings");
//Load some data:
$Page->variable("all-plans", $Page::$conn->get("settingsplan"));
//Set additional end body JS import and Conditional JS:
Trace::add_step(__FILE__, "Define conditional js libs for end body section");
$Page->include_js(array(GPATH_LIB_JS . "jQuery/jquery-1.11.1.min.js", GPATH_LIB_JS . "jQueryUI/jquery-ui.min.js", GPATH_LIB_JS . "switch/jquery.switchButton.js", GPATH_LIB_JS . "App/app.js"), false);
//Set header:
Trace::add_step(__FILE__, "Load page header");
require_once PATH_STRUCT . 'head.php';
//Page Markup:
Trace::reg_var("onload view", $Page->variable("load-view"));
Trace::reg_var("all plans", $Page->variable("all-plans"));
Trace::add_step(__FILE__, "Load page HTML");
?>
<nav class="navbar">
<div class="logo"><?php
Lang::P("gen_title_for_display");
?>
<em><?php
echo "v" . $Page::$conf["general"]["app_version"];
?>
</em></div>
<ul>
<li class="<?php
echo $Page->variable("load-view") === "settings" ? "active" : "";
?>