本文整理汇总了PHP中TBGSettings::getAll方法的典型用法代码示例。如果您正苦于以下问题:PHP TBGSettings::getAll方法的具体用法?PHP TBGSettings::getAll怎么用?PHP TBGSettings::getAll使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TBGSettings
的用法示例。
在下文中一共展示了TBGSettings::getAll方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generateDebugInfo
protected static function generateDebugInfo()
{
$tbg_summary = array();
$load_time = self::getLoadtime();
if (\b2db\Core::isInitialized()) {
$tbg_summary['db']['queries'] = \b2db\Core::getSQLHits();
$tbg_summary['db']['timing'] = \b2db\Core::getSQLTiming();
}
$tbg_summary['load_time'] = $load_time >= 1 ? round($load_time, 2) . 's' : round($load_time * 1000, 1) . 'ms';
$tbg_summary['scope'] = array();
$scope = self::getScope();
$tbg_summary['scope']['id'] = $scope instanceof TBGScope ? $scope->getID() : 'unknown';
$tbg_summary['scope']['hostnames'] = $scope instanceof TBGScope && \b2db\Core::isConnected() ? implode(', ', $scope->getHostnames()) : 'unknown';
$tbg_summary['settings'] = TBGSettings::getAll();
$tbg_summary['memory'] = memory_get_usage();
$tbg_summary['partials'] = self::getVisitedPartials();
if (self::$_i18n instanceof TBGI18n) {
foreach (self::getI18n()->getMissingStrings() as $text => $value) {
TBGLogging::log('The text "' . $text . '" does not exist in list of translated strings, and was added automatically', 'i18n', TBGLogging::LEVEL_NOTICE);
}
}
$tbg_summary['log'] = TBGLogging::getEntries();
$tbg_summary['routing'] = array('name' => self::getRouting()->getCurrentRouteName(), 'module' => self::getRouting()->getCurrentRouteModule(), 'action' => self::getRouting()->getCurrentRouteAction());
if (isset($_SESSION)) {
if (!array_key_exists('___DEBUGINFO___', $_SESSION)) {
$_SESSION['___DEBUGINFO___'] = array();
}
$_SESSION['___DEBUGINFO___'][self::$debug_id] = $tbg_summary;
while (count($_SESSION['___DEBUGINFO___']) > 10) {
array_shift($_SESSION['___DEBUGINFO___']);
}
}
}
示例2: image_tag
<?php
echo image_tag('debug_log.png', array('style' => 'float: right; margin-left: 5px; cursor: pointer;'));
?>
</span>
</td>
</tr>
</table>
</div>
<div id="scope_settings" style="display: none;">
<div style="font-size: 16px; font-weight: bold; border-bottom: 1px solid #DDD; padding: 4px;">Scope <?php
echo TBGContext::getScope()->getID();
?>
settings</div>
<div class="log">
<?php
foreach (TBGSettings::getAll() as $module => $settings) {
?>
<h3><?php
echo $module;
?>
</h3>
<table style="border: 0;" cellpadding="0" cellspacing="0">
<?php
foreach ($settings as $setting => $setting_details) {
?>
<tr>
<td style="font-size: 12px; padding: 1px 5px 1px 1px;"><b><?php
echo $setting;
?>
: </b></td>
<td style="font-size: 12px;">