本文整理汇总了PHP中ob_get_clean函数的典型用法代码示例。如果您正苦于以下问题:PHP ob_get_clean函数的具体用法?PHP ob_get_clean怎么用?PHP ob_get_clean使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ob_get_clean函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: dump
function dump($var, $echo = true, $label = null, $strict = true)
{
$label = $label === null ? '' : rtrim($label) . ' ';
if (!$strict) {
if (ini_get('html_errors')) {
$output = print_r($var, true);
$output = "<pre>" . $label . htmlspecialchars($output, ENT_QUOTES) . "</pre>";
} else {
$output = $label . " : " . print_r($var, true);
}
} else {
ob_start();
var_dump($var);
$output = ob_get_clean();
if (!extension_loaded('xdebug')) {
$output = preg_replace("/\\]\\=\\>\n(\\s+)/m", "] => ", $output);
$output = '<pre>' . $label . htmlspecialchars($output, ENT_QUOTES, "GB2312") . '</pre>';
}
}
if ($echo) {
echo $output;
return null;
} else {
return $output;
}
}
开发者ID:winiceo,项目名称:job,代码行数:26,代码来源:lib.php
示例2: testAuth
/**
* Test for AuthenticationSignon::auth
*
* @return void
*/
public function testAuth()
{
if (!defined('PMA_TEST_HEADERS')) {
$this->markTestSkipped('Cannot redefine constant/function - missing runkit extension');
}
// case 1
$GLOBALS['cfg']['Server']['SignonURL'] = '';
ob_start();
$this->object->auth();
$result = ob_get_clean();
$this->assertContains('You must set SignonURL!', $result);
// case 2
$GLOBALS['cfg']['Server']['SignonURL'] = 'http://phpmyadmin.net/SignonURL';
$_REQUEST['old_usr'] = 'oldUser';
$GLOBALS['cfg']['Server']['LogoutURL'] = 'http://phpmyadmin.net/logoutURL';
$this->object->auth();
$this->assertContains('Location: http://phpmyadmin.net/logoutURL?PHPSESSID=', $GLOBALS['header'][0]);
// case 3
$GLOBALS['header'] = array();
$GLOBALS['cfg']['Server']['SignonURL'] = 'http://phpmyadmin.net/SignonURL';
$_REQUEST['old_usr'] = '';
$GLOBALS['cfg']['Server']['LogoutURL'] = '';
$this->object->auth();
$this->assertContains('Location: http://phpmyadmin.net/SignonURL?PHPSESSID=', $GLOBALS['header'][0]);
}
开发者ID:roccivic,项目名称:phpmyadmin,代码行数:30,代码来源:PMA_AuthenticationSignon_test.php
示例3: parse
/**
* Parses YAML into a PHP array.
*
* The parse method, when supplied with a YAML stream (string or file),
* will do its best to convert YAML in a file into a PHP array.
*
* Usage:
* <code>
* $array = Yaml::parse('config.yml');
* print_r($array);
* </code>
*
* @param string $input Path to a YAML file or a string containing YAML
*
* @return array The YAML converted to a PHP array
*
* @throws \InvalidArgumentException If the YAML is not valid
*
* @api
*/
public static function parse($input)
{
// if input is a file, process it
$file = '';
if (strpos($input, "\n") === false && is_file($input)) {
if (false === is_readable($input)) {
throw new ParseException(sprintf('Unable to parse "%s" as the file is not readable.', $input));
}
$file = $input;
if (self::$enablePhpParsing) {
ob_start();
$retval = (include $file);
$content = ob_get_clean();
// if an array is returned by the config file assume it's in plain php form else in YAML
$input = is_array($retval) ? $retval : $content;
// if an array is returned by the config file assume it's in plain php form else in YAML
if (is_array($input)) {
return $input;
}
} else {
$input = file_get_contents($file);
}
}
$yaml = new Parser();
try {
return $yaml->parse($input);
} catch (ParseException $e) {
if ($file) {
$e->setParsedFile($file);
}
throw $e;
}
}
开发者ID:QianmiHub,项目名称:crypto-js,代码行数:53,代码来源:Yaml.php
示例4: render
public function render()
{
extract($this->pageVars);
ob_start();
require $this->template;
echo ob_get_clean();
}
开发者ID:rogerioalbino,项目名称:mvc,代码行数:7,代码来源:AbstractView.php
示例5: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f = $this->env->getExtension("native_profiler");
$__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f->enter($__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "WebProfilerBundle:Profiler:toolbar_item.html.twig"));
// line 1
if (isset($context["link"]) ? $context["link"] : $this->getContext($context, "link")) {
// line 2
echo " ";
ob_start();
// line 3
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("token" => isset($context["token"]) ? $context["token"] : $this->getContext($context, "token"), "panel" => isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"))), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "html", null, true);
echo "</a>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
}
// line 6
echo "<div class=\"sf-toolbar-block\">\n <div class=\"sf-toolbar-icon\">";
// line 7
echo twig_escape_filter($this->env, array_key_exists("icon", $context) ? _twig_default_filter(isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "") : "", "html", null, true);
echo "</div>\n <div class=\"sf-toolbar-info\">";
// line 8
echo twig_escape_filter($this->env, array_key_exists("text", $context) ? _twig_default_filter(isset($context["text"]) ? $context["text"] : $this->getContext($context, "text"), "") : "", "html", null, true);
echo "</div>\n</div>\n";
$__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f->leave($__internal_7088dc18de042b162a99a327c85232e1f7c79938f5c6e62a2f20a47464d52c5f_prof);
}
开发者ID:valeriemontoya90,项目名称:findWorker,代码行数:27,代码来源:8d4635b47ab8ab3bf3352cb81a02e822f23088a5da0711f03c5ad81c103fe122.php
示例6: cf_shortcode
function cf_shortcode()
{
ob_start();
submitted();
html_form_code();
return ob_get_clean();
}
开发者ID:gree-gorey,项目名称:form-plugin,代码行数:7,代码来源:formplugin.php
示例7: content_565ead2acc18a3_66288090
function content_565ead2acc18a3_66288090($_smarty_tpl)
{
echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('wishlistProductsIds' => $_smarty_tpl->tpl_vars['wishlist_products']->value), $_smarty_tpl);
$_smarty_tpl->smarty->_tag_stack[] = array('addJsDefL', array('name' => 'loggin_required'));
$_block_repeat = true;
echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'loggin_required'), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo smartyTranslate(array('s' => 'You must be logged in to manage your wishlist.', 'mod' => 'blockwishlist', 'js' => 1), $_smarty_tpl);
$_block_content = ob_get_clean();
$_block_repeat = false;
echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'loggin_required'), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
$_smarty_tpl->smarty->_tag_stack[] = array('addJsDefL', array('name' => 'added_to_wishlist'));
$_block_repeat = true;
echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'added_to_wishlist'), null, $_smarty_tpl, $_block_repeat);
while ($_block_repeat) {
ob_start();
echo smartyTranslate(array('s' => 'The product was successfully added to your wishlist.', 'mod' => 'blockwishlist', 'js' => 1), $_smarty_tpl);
$_block_content = ob_get_clean();
$_block_repeat = false;
echo $_smarty_tpl->smarty->registered_plugins['block']['addJsDefL'][0][0]->addJsDefL(array('name' => 'added_to_wishlist'), $_block_content, $_smarty_tpl, $_block_repeat);
}
array_pop($_smarty_tpl->smarty->_tag_stack);
echo $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['addJsDef'][0][0]->addJsDef(array('mywishlist_url' => preg_replace("%(?<!\\\\)'%", "\\'", $_smarty_tpl->tpl_vars['link']->value->getModuleLink('blockwishlist', 'mywishlist', array(), true))), $_smarty_tpl);
?>
<?php
}
开发者ID:Nyura95,项目名称:prestashop,代码行数:30,代码来源:15bffc57343dd65e5f46b2604564e9e33408cfad.file.blockwishlist_top.tpl.php
示例8: testPathCommand
/**
* @outputBuffering enabled
* @dataProvider argumentsProvider
* @depends testUseLatestPHP
*/
public function testPathCommand($arg, $pattern)
{
ob_start();
$this->runCommandWithStdout("phpbrew path {$arg}");
$path = ob_get_clean();
$this->assertRegExp($pattern, $path);
}
开发者ID:phpbrew,项目名称:phpbrew,代码行数:12,代码来源:PathCommandTest.php
示例9: jigoshop_product_tag
function jigoshop_product_tag($attributes)
{
global $paged;
$jigoshop_options = Jigoshop_Base::get_options();
$attributes = shortcode_atts(array('tag' => '', 'per_page' => $jigoshop_options->get('jigoshop_catalog_per_page'), 'columns' => $jigoshop_options->get('jigoshop_catalog_columns'), 'orderby' => $jigoshop_options->get('jigoshop_catalog_sort_orderby'), 'order' => $jigoshop_options->get('jigoshop_catalog_sort_direction'), 'pagination' => false, 'tax_operator' => 'IN'), $attributes);
if (isset($_REQUEST['tag'])) {
$attributes['tag'] = $_REQUEST['tag'];
}
/** Operator validation. */
if (!in_array($attributes['tax_operator'], array('IN', 'NOT IN', 'AND'))) {
$tax_operator = 'IN';
}
/** Multiple category values. */
if (!empty($slug)) {
$slug = explode(',', esc_attr($slug));
$slug = array_map('trim', $slug);
}
$args = array('post_type' => 'product', 'post_status' => 'publish', 'ignore_sticky_posts' => 1, 'posts_per_page' => $attributes['per_page'], 'orderby' => $attributes['orderby'], 'order' => $attributes['order'], 'paged' => $paged, 'meta_query' => array(array('key' => 'visibility', 'value' => array('catalog', 'visible'), 'compare' => 'IN')), 'tax_query' => array(array('taxonomy' => 'product_tag', 'field' => 'slug', 'terms' => $attributes['tag'], 'operator' => $attributes['tax_operator'])));
query_posts($args);
ob_start();
jigoshop_get_template_part('loop', 'shop');
if ($attributes['pagination']) {
do_action('jigoshop_pagination');
}
wp_reset_query();
return ob_get_clean();
}
开发者ID:ashik968,项目名称:digiplot,代码行数:27,代码来源:product_tag.php
示例10: block_toolbar
public function block_toolbar($context, array $blocks = array())
{
// line 4
echo " ";
ob_start();
// line 5
echo " <span>\n <img width=\"13\" height=\"28\" alt=\"Memory Usage\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAcBAMAAABITyhxAAAAJ1BMVEXNzc3///////////////////////8/Pz////////////+NjY0/Pz9lMO+OAAAADHRSTlMAABAgMDhAWXCvv9e8JUuyAAAAQ0lEQVQI12MQBAMBBmLpMwoMDAw6BxjOOABpHyCdAKRzsNDp5eXl1KBh5oHBAYY9YHoDQ+cqIFjZwGCaBgSpBrjcCwCZgkUHKKvX+wAAAABJRU5ErkJggg==\" />\n <span>";
// line 7
echo twig_escape_filter($this->env, sprintf("%.1f", $this->getAttribute(isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "memory") / 1024 / 1024), "html", null, true);
echo " MB</span>\n </span>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 10
echo " ";
ob_start();
// line 11
echo " <div class=\"sf-toolbar-info-piece\">\n <b>Memory usage</b>\n <span>";
// line 13
echo twig_escape_filter($this->env, sprintf("%.1f", $this->getAttribute(isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "memory") / 1024 / 1024), "html", null, true);
echo " / ";
echo $this->getAttribute(isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "memoryLimit") == -1 ? "∞" : twig_escape_filter($this->env, sprintf("%.1f", $this->getAttribute(isset($context["collector"]) ? $context["collector"] : $this->getContext($context, "collector"), "memoryLimit") / 1024 / 1024));
echo " MB</span>\n </div>\n ";
$context["text"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 16
echo " ";
$this->env->loadTemplate("@WebProfiler/Profiler/toolbar_item.html.twig")->display(array_merge($context, array("link" => false)));
}
开发者ID:NickPolyder,项目名称:WebVillas-Symfony2Edition-,代码行数:26,代码来源:ffe26a9a069fb38f1ae6a5b4c3d95b460995085423a62ae5d80b53fbea61.php
示例11: return_wpsc_end_category_query
/**
* modified wpsc end category query function
*/
function return_wpsc_end_category_query()
{
global $wpdb, $wpsc_category_query;
$category_html = ob_get_clean();
return wpsc_display_category_loop($wpsc_category_query, $category_html);
unset($GLOBALS['wpsc_category_query']);
}
开发者ID:BGCX261,项目名称:zombie-craft-svn-to-git,代码行数:10,代码来源:splitcategories.php
示例12: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee = $this->env->getExtension("native_profiler");
$__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee->enter($__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@WebProfiler/Profiler/toolbar_item.html.twig"));
// line 1
if (isset($context["link"]) ? $context["link"] : $this->getContext($context, "link")) {
// line 2
echo " ";
ob_start();
// line 3
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("token" => isset($context["token"]) ? $context["token"] : $this->getContext($context, "token"), "panel" => isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"))), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "html", null, true);
echo "</a>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
}
// line 6
echo "<div class=\"sf-toolbar-block\">\n <div class=\"sf-toolbar-icon\">";
// line 7
echo twig_escape_filter($this->env, array_key_exists("icon", $context) ? _twig_default_filter(isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "") : "", "html", null, true);
echo "</div>\n <div class=\"sf-toolbar-info\">";
// line 8
echo twig_escape_filter($this->env, array_key_exists("text", $context) ? _twig_default_filter(isset($context["text"]) ? $context["text"] : $this->getContext($context, "text"), "") : "", "html", null, true);
echo "</div>\n</div>\n";
$__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee->leave($__internal_47e46a679ebe1f6c3fe3890c127d510e112b274d7f29ddc36299a2ef0416fbee_prof);
}
开发者ID:johnpaulada,项目名称:oauth-api-test,代码行数:27,代码来源:f475485a497ede848cdaab50624ee3f9d4d71ce702f0279c7a1553f20f803767.php
示例13: render
/**
* Render a template
*
* Example:
*
* $template->render('template_name', ['bla' => 'value']);
*
* @access public
* @param string $__template_name Template name
* @param array $__template_args Key/Value map of template variables
* @return string
*/
public function render($__template_name, array $__template_args = array())
{
extract($__template_args);
ob_start();
include $this->getTemplateFile($__template_name);
return ob_get_clean();
}
开发者ID:Trapulo,项目名称:kanboard,代码行数:19,代码来源:Template.php
示例14: debugPrint
function debugPrint($var, $file = '')
{
$more_info = '';
if (is_string($var)) {
$more_info = 'size: ' . strlen($var);
} elseif (is_bool($var)) {
$more_info = 'val: ' . ($var ? 'true' : 'false');
} elseif (is_null($var)) {
$more_info = 'is null';
} elseif (is_array($var)) {
$more_info = count($var);
}
if ($file === true) {
$file = '/tmp/logDebug';
}
if (strlen($file) > 0) {
$f = fopen($file, "a");
ob_start();
echo date("Y/m/d H:i:s") . " (" . gettype($var) . ") " . $more_info . "\n";
print_r($var);
echo "\n\n";
$output = ob_get_clean();
fprintf($f, "%s", $output);
fclose($f);
} else {
echo "<pre>" . date("Y/m/d H:i:s") . " (" . gettype($var) . ") " . $more_info . "</pre>";
echo "<pre>";
print_r($var);
echo "</pre>";
}
}
开发者ID:dsyman2,项目名称:integriaims,代码行数:31,代码来源:functions_html.php
示例15: execute
public function execute()
{
$params = $this->extractRequestParams();
$modules = array();
foreach ($params['modules'] as $path) {
$modules[] = $this->getModuleFromPath($path);
}
// Get the help
$context = new DerivativeContext($this->getMain()->getContext());
$context->setSkin(SkinFactory::getDefaultInstance()->makeSkin('apioutput'));
$context->setLanguage($this->getMain()->getLanguage());
$context->setTitle(SpecialPage::getTitleFor('ApiHelp'));
$out = new OutputPage($context);
$out->setCopyrightUrl('https://www.mediawiki.org/wiki/Special:MyLanguage/Copyright');
$context->setOutput($out);
self::getHelp($context, $modules, $params);
// Grab the output from the skin
ob_start();
$context->getOutput()->output();
$html = ob_get_clean();
$result = $this->getResult();
if ($params['wrap']) {
$data = array('mime' => 'text/html', 'help' => $html);
ApiResult::setSubelementsList($data, 'help');
$result->addValue(null, $this->getModuleName(), $data);
} else {
$result->reset();
$result->addValue(null, 'text', $html, ApiResult::NO_SIZE_CHECK);
$result->addValue(null, 'mime', 'text/html', ApiResult::NO_SIZE_CHECK);
}
}
开发者ID:paladox,项目名称:2,代码行数:31,代码来源:ApiHelp.php
示例16: calltoaction_sc
function calltoaction_sc($atts, $content = '')
{
extract(shortcode_atts(array("link" => '', "class" => '', "title" => 'Call to actions'), $atts));
$href = '';
if ($link) {
$href = 'href="' . $link . '"';
}
$classes = "btn";
if ($class) {
$classes .= ' ' . $class;
}
$classes = 'class="' . $classes . '"';
ob_start();
?>
<div class="row">
<div class="twelve col text-center">
<?php
echo do_shortcode($content);
?>
<a <?php
echo $href . ' ' . $classes;
?>
><?php
echo $title;
?>
</a>
</div>
</div>
<?php
$data = ob_get_clean();
return $data;
}
开发者ID:sankam-nikolya,项目名称:lptt,代码行数:34,代码来源:calltoaction.php
示例17: captureAppend
public function captureAppend($partial, $name)
{
if (!isset($this->_capture_data[$name])) {
$this->_capture_data[$name] = '';
}
$this->_capture_data[$name] .= ob_get_clean();
}
开发者ID:yslbc,项目名称:twcompany,代码行数:7,代码来源:Capture.php
示例18: index
/**
* 首页
*/
public function index()
{
$file = FCPATH . 'cache/index/home-' . ($this->template->mobile ? 'mb-' : '') . SITE_ID . '.html';
// 系统开启静态首页、静态文件不存在时,才生成文件
//zjp添加,动态显示日期天气温度
if ($_SESSION["de_json"] == '') {
$city = "宜春";
$content = file_get_contents("http://api.map.baidu.com/telematics/v3/weather?location=宜春&output=json&ak=i8GFDZTM22uqICZbtioaVbnk");
$de_json = json_decode($content, TRUE);
$_SESSION["de_json"] = $de_json;
}
/*zjp 0819 添加调取最新的调查问卷start*/
//echo APP_DIR;
//echo 1;
//$this->load->model('category_model');
//$question_id = $this->category_model->get_question_id();
/*zjp 0819 添加调取最新的调查问卷end */
if (SITE_HOME_INDEX && !is_file($file)) {
ob_start();
$this->template->assign(array('indexc' => 1, 'meta_title' => SITE_TITLE, 'meta_keywords' => SITE_KEYWORDS, 'meta_description' => SITE_DESCRIPTION, 'de_json' => $_SESSION["de_json"]));
$this->template->display('index.html');
$html = ob_get_clean();
@file_put_contents($file, $html, LOCK_EX);
echo $html;
exit;
} else {
$this->template->assign(array('indexc' => 1, 'meta_title' => SITE_TITLE, 'meta_keywords' => SITE_KEYWORDS, 'meta_description' => SITE_DESCRIPTION, 'de_json' => $de_json));
$this->template->display('index.html');
}
}
开发者ID:Thebeautifullife,项目名称:yichunchengguan,代码行数:33,代码来源:Home.php
示例19: block_toolbar
public function block_toolbar($context, array $blocks = array())
{
// line 4
echo " ";
if ($this->getAttribute($this->getContext($context, "collector"), "messagecount")) {
// line 5
echo " ";
ob_start();
// line 6
echo " <img width=\"23\" height=\"28\" alt=\"Swiftmailer\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABcAAAAcCAYAAACK7SRjAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNSBNYWNpbnRvc2giIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6N0NEOTU1MjM0OThFMTFFMDg3NzJBNTE2ODgwQzMxMzQiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6N0NEOTU1MjQ0OThFMTFFMDg3NzJBNTE2ODgwQzMxMzQiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDoxMEQ5OTQ5QzQ5OEMxMUUwODc3MkE1MTY4ODBDMzEzNCIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDo3Q0Q5NTUyMjQ5OEUxMUUwODc3MkE1MTY4ODBDMzEzNCIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/PpkRnSAAAAJ0SURBVHjaYvz//z8DrQATAw3BqOFYAaO9vT1FBhw4cGCAXA5MipxBQUHT3r17l0AVAxkZ/wkLC89as2ZNIcjlYkALXKnlWqBZTH/+/PEDmQsynLW/v3+NoaHhN2oYDjJn8uTJK4BMNpDhPwsLCwOKiop2+fn5vafEYC8vrw8gc/Lz8wOB3B8gw/nev38vn5WV5eTg4LA/Ly/vESsrK2npmYmJITU19SnQ8L0gc4DxpwgyF2S4EEjB58+f+crLy31YWFjOt7S0XBYUFPxHjMEcHBz/6+rqboqJiZ0qKSnxBpkDlRICGc4MU/j792+2CRMm+L18+fLSxIkTDykoKPzBZ7CoqOi/np6eE8rKylvb29v9fvz4wYEkzYKRzjk5OX/LyMjcnDRpEkjjdisrK6wRraOj8wvokAMLFy788ejRoxcaGhrPCWai4ODgB8DUE3/mzBknYMToASNoMzAfvEVW4+Tk9LmhoWFbTU2NwunTpx2BjiiMjo6+hm4WCzJHUlLyz+vXrxkfP36sDOI/ffpUPikpibe7u3sLsJjQW7VqlSrQxe+Avjmanp7u9PbtWzGQOmCCkARmmu/m5uYfT548yY/V5UpKSl+2b9+uiiz26dMnIWBSDTp27NgdYGrYCIzwE7m5uR4wg2Hg/PnzSsDI/QlKOcjZ3wGUBLm5uf+DwLdv38gub4AG/xcSEvr35s0bZmCB5sgCE/z69SsjyDJKMtG/f/8YQQYD8wkoGf8H51AbG5sH1CpbQBnQ09PzBiiHgoIFFHlBQGwLxLxUMP8dqJgH4k3gIhfIkAKVYkDMTmmhCHIxEL8A4peMo02L4WU4QIABANxZAoDIQDv3AAAAAElFTkSuQmCC\" />\n <span class=\"sf-toolbar-status\">";
// line 7
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "collector"), "messageCount"), "html", null, true);
echo "</span>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 9
echo " ";
ob_start();
// line 10
echo " <div class=\"sf-toolbar-info-piece\">\n <b>Messages</b>\n <span>";
// line 12
echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, "collector"), "messageCount"), "html", null, true);
echo "</span>\n </div>\n <div class=\"sf-toolbar-info-piece\">\n <b>Is spooled ?</b>\n <span>";
// line 16
echo $this->getAttribute($this->getContext($context, "collector"), "isSpool") ? "yes" : "no";
echo "</span>\n </div>\n ";
$context["text"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
// line 19
echo " ";
$this->env->loadTemplate("WebProfilerBundle:Profiler:toolbar_item.html.twig")->display(array_merge($context, array("link" => $this->getContext($context, "profiler_url"))));
// line 20
echo " ";
}
}
开发者ID:nsteenv,项目名称:bewelcome-symfony,代码行数:33,代码来源:df9ad58db2ef01bd996578be15fd.php
示例20: doDisplay
protected function doDisplay(array $context, array $blocks = array())
{
$__internal_023609d92d381e03bd445478c92dce8749d9d9476b3dad6d0720ffef1d0d4875 = $this->env->getExtension("native_profiler");
$__internal_023609d92d381e03bd445478c92dce8749d9d9476b3dad6d0720ffef1d0d4875->enter($__internal_023609d92d381e03bd445478c92dce8749d9d9476b3dad6d0720ffef1d0d4875_prof = new Twig_Profiler_Profile($this->getTemplateName(), "template", "@WebProfiler/Profiler/toolbar_item.html.twig"));
// line 1
if (isset($context["link"]) ? $context["link"] : $this->getContext($context, "link")) {
// line 2
echo " ";
ob_start();
// line 3
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("token" => isset($context["token"]) ? $context["token"] : $this->getContext($context, "token"), "panel" => isset($context["name"]) ? $context["name"] : $this->getContext($context, "name"))), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "html", null, true);
echo "</a>\n ";
$context["icon"] = '' === ($tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
}
// line 6
echo "<div class=\"sf-toolbar-block\">\n <div class=\"sf-toolbar-icon\">";
// line 7
echo twig_escape_filter($this->env, array_key_exists("icon", $context) ? _twig_default_filter(isset($context["icon"]) ? $context["icon"] : $this->getContext($context, "icon"), "") : "", "html", null, true);
echo "</div>\n <div class=\"sf-toolbar-info\">";
// line 8
echo twig_escape_filter($this->env, array_key_exists("text", $context) ? _twig_default_filter(isset($context["text"]) ? $context["text"] : $this->getContext($context, "text"), "") : "", "html", null, true);
echo "</div>\n</div>\n";
$__internal_023609d92d381e03bd445478c92dce8749d9d9476b3dad6d0720ffef1d0d4875->leave($__internal_023609d92d381e03bd445478c92dce8749d9d9476b3dad6d0720ffef1d0d4875_prof);
}
开发者ID:valde1992,项目名称:Symfony2-prueba,代码行数:27,代码来源:e2adba3e0f23dc8f186739fcd5aa525a635677b2c840642748bcc511f6d3c832.php
注:本文中的ob_get_clean函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论