本文整理汇总了PHP中AppContext::get_bench方法的典型用法代码示例。如果您正苦于以下问题:PHP AppContext::get_bench方法的具体用法?PHP AppContext::get_bench怎么用?PHP AppContext::get_bench使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类AppContext
的用法示例。
在下文中一共展示了AppContext::get_bench方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
public function display($content)
{
$template = new FileTemplate('admin/body.tpl');
$template->add_lang(self::$lang);
$theme = ThemesManager::get_theme(AppContext::get_current_user()->get_theme());
$customize_interface = $theme->get_customize_interface();
$header_logo_path = $customize_interface->get_header_logo_path();
$template->put_all(array('SITE_NAME' => GeneralConfig::load()->get_site_name(), 'SITE_SLOGAN' => GeneralConfig::load()->get_site_slogan(), 'C_HEADER_LOGO' => !empty($header_logo_path), 'HEADER_LOGO' => Url::to_rel($header_logo_path), 'PHPBOOST_VERSION' => GeneralConfig::load()->get_phpboost_major_version(), 'CONTENT' => $content, 'L_INDEX_SUPPORT' => self::$lang['index.support'], 'L_INDEX_FAQ' => self::$lang['index.faq'], 'L_INDEX_DOCUMENTATION' => self::$lang['index.documentation'], 'L_POWERED_BY' => self::$lang['powered_by'], 'L_PHPBOOST_RIGHT' => self::$lang['phpboost_right'], 'L_ADMINISTRATION' => self::$lang['index.administration'], 'L_INDEX_SITE' => self::$lang['index.site'], 'L_EXTEND_MENU' => self::$lang['index.extend_menu'], 'L_DISCONNECT' => self::$lang['index.disconnect'], 'L_ADMIN_MAIN_MENU' => self::$lang['admin.main_menu'], 'L_NEED_HELP' => self::$lang['admin.need_help']));
if (GraphicalEnvironmentConfig::load()->is_page_bench_enabled()) {
$template->put_all(array('C_DISPLAY_BENCH' => true, 'BENCH' => AppContext::get_bench()->to_string(), 'REQ' => PersistenceContext::get_querier()->get_executed_requests_count(), 'MEMORY_USED' => AppContext::get_bench()->get_memory_php_used(), 'L_REQ' => self::$lang['sql_req'], 'L_ACHIEVED' => self::$lang['achieved'], 'L_UNIT_SECOND' => LangLoader::get_message('unit.seconds', 'date-common')));
}
if (GraphicalEnvironmentConfig::load()->get_display_theme_author()) {
$theme_configuration = ThemesManager::get_theme(AppContext::get_current_user()->get_theme())->get_configuration();
$template->put_all(array('C_DISPLAY_AUTHOR_THEME' => true, 'L_THEME' => self::$lang['theme'], 'L_THEME_NAME' => $theme_configuration->get_name(), 'L_BY' => strtolower(self::$lang['by']), 'L_THEME_AUTHOR' => $theme_configuration->get_author_name(), 'U_THEME_AUTHOR_LINK' => $theme_configuration->get_author_link()));
}
$template->put('subheader_menu', self::get_subheader_tpl());
$this->display_page($template);
}
示例2: display
/**
* {@inheritdoc}
*/
public function display($content)
{
$template = new FileTemplate('body.tpl');
$theme = ThemesManager::get_theme(AppContext::get_current_user()->get_theme());
$customize_interface = $theme->get_customize_interface();
$header_logo_path = $customize_interface->get_header_logo_path();
$template->put_all(array('MAINTAIN' => $this->display_site_maintenance(), 'SITE_NAME' => GeneralConfig::load()->get_site_name(), 'SITE_SLOGAN' => GeneralConfig::load()->get_site_slogan(), 'C_HEADER_LOGO' => !empty($header_logo_path), 'HEADER_LOGO' => Url::to_rel($header_logo_path), 'PHPBOOST_VERSION' => GeneralConfig::load()->get_phpboost_major_version(), 'CONTENT' => $content, 'ACTIONS_MENU' => ModuleTreeLinksService::display_actions_menu(), 'L_POWERED_BY' => self::$main_lang['powered_by'], 'L_PHPBOOST_RIGHT' => self::$main_lang['phpboost_right']));
$this->display_kernel_message($template);
$this->display_counter($template);
$this->display_menus($template);
$this->get_breadcrumb()->display($template);
if (GraphicalEnvironmentConfig::load()->is_page_bench_enabled()) {
$template->put_all(array('C_DISPLAY_BENCH' => true, 'BENCH' => AppContext::get_bench()->to_string(), 'REQ' => PersistenceContext::get_querier()->get_executed_requests_count(), 'MEMORY_USED' => AppContext::get_bench()->get_memory_php_used(), 'L_REQ' => self::$main_lang['sql_req'], 'L_ACHIEVED' => self::$main_lang['achieved'], 'L_UNIT_SECOND' => LangLoader::get_message('unit.seconds', 'date-common')));
}
if (GraphicalEnvironmentConfig::load()->get_display_theme_author()) {
$theme_configuration = ThemesManager::get_theme(AppContext::get_current_user()->get_theme())->get_configuration();
$template->put_all(array('C_DISPLAY_AUTHOR_THEME' => true, 'L_THEME' => self::$main_lang['theme'], 'L_THEME_NAME' => $theme_configuration->get_name(), 'L_BY' => strtolower(self::$main_lang['by']), 'L_THEME_AUTHOR' => $theme_configuration->get_author_name(), 'U_THEME_AUTHOR_LINK' => $theme_configuration->get_author_link()));
}
$this->display_page($template);
}