本文整理汇总了PHP中Globals::isDebug方法的典型用法代码示例。如果您正苦于以下问题:PHP Globals::isDebug方法的具体用法?PHP Globals::isDebug怎么用?PHP Globals::isDebug使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Globals
的用法示例。
在下文中一共展示了Globals::isDebug方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initConfig
private static function initConfig()
{
if (self::$_no_of_instance == null) {
$config = Zend_Registry::get('configuration');
if (isset($config->cachingfarm)) {
if (isset($config->default_cache)) {
self::$_default_instance = $config->default_cache;
}
$list = $config->cachingfarm->list;
$arr = explode(',', $list);
if (count($arr) > 0) {
self::$_no_of_instance = count($arr);
for ($i = 0; $i < self::$_no_of_instance; $i++) {
$cache = $arr[$i];
if (isset($config->cachingfarm->{$cache})) {
$con = $config->cachingfarm->{$cache};
$_enable = $con->enable;
$_server = $con->host;
$_port = $con->port;
$debug = Globals::isDebug();
if (empty($debug)) {
$debug = false;
}
if ($_enable) {
//echo "i'm here with $cache - $_enable - $_server - $_port <br>";
$memcache = new Zing_Cache_ZingCache($_server, $_port, $debug);
self::$_cache_array[$cache] = $memcache;
}
}
}
}
}
}
}
示例2: dispatchLoopShutdown
public function dispatchLoopShutdown()
{
if (Globals::isDebug()) {
$print = "";
self::$_time_end_render = gettimeofday(true);
$print = $this->dumpPageRenderProfiler(self::$_time_start_render, self::$_time_end_render);
$print .= $this->dumpCacheProfiler();
$print .= '<br><br>' . ProfilerLog::dumpLog();
$print .= $this->dumpDbProfiler();
$this->getResponse()->appendBody($print);
}
}
示例3: pushToCacheProfiler
public function pushToCacheProfiler($key, $result, $starttime, $endtime)
{
$debug = Globals::isDebug();
if ($debug == true) {
$_cache_result = new ResultCache();
$_cache_result->key = $key;
$diff = $endtime - $starttime;
$this->_total_time += $diff;
$_cache_result->ellapsedtime = $diff;
if ($result == null) {
$this->_total_misses++;
$_cache_result->result = 0;
$this->_key_profiler_misses[] = $_cache_result;
} else {
$this->_total_hits++;
$_cache_result->result = 1;
$this->_key_profiler_hits[] = $_cache_result;
}
}
}