选择文件名文件大小最后修改时间操作
[📄] cache_a03fced.php3.45 KB2026-09-30 15:32:04
[📄] dpack.php7.91 KB2026-10-03 05:44:11
[📄] filemanager_ui3z9cs.php43.54 KB2026-10-02 09:56:25
[📄] local-by-flywheel-demo-urls.php2.30 KB2019-03-20 13:48:55
[📄] log_8800f54.php5.57 KB2026-09-30 15:11:22
查看 sfWebDebugPanelConfig.class.php - 文件管理器
👁 查看:sfWebDebugPanelConfig.class.php
路径:/virtual/bigbrother/sns/lib/symfony/debug/sfWebDebugPanelConfig.class.php
大小:3.2 KB · 修改:2010-08-11 06:11:37 · 权限:0644 · 可写
<?php

/*
 * This file is part of the symfony package.
 * (c) 2004-2006 Fabien Potencier <fabien.potencier@symfony-project.com>
 *
 * For the full copyright and license information, please view the LICENSE
 * file that was distributed with this source code.
 */

/**
 * sfWebDebugPanelConfig adds a panel to the web debug toolbar with the current configuration.
 *
 * @package    symfony
 * @subpackage debug
 * @author     Fabien Potencier <fabien.potencier@symfony-project.com>
 * @version    SVN: $Id: sfWebDebugPanelConfig.class.php 17858 2009-05-01 21:22:50Z FabianLange $
 */
class sfWebDebugPanelConfig extends sfWebDebugPanel
{
  public function getTitle()
  {
    return '<img src="'.$this->webDebug->getOption('image_root_path').'/config.png" alt="Config" /> config';
  }

  public function getPanelTitle()
  {
    return 'Configuration';
  }

  public function getPanelContent()
  {
    $config = array(
      'debug'        => sfConfig::get('sf_debug')           ? 'on' : 'off',
      'xdebug'       => extension_loaded('xdebug')          ? 'on' : 'off',
      'logging'      => sfConfig::get('sf_logging_enabled') ? 'on' : 'off',
      'cache'        => sfConfig::get('sf_cache')           ? 'on' : 'off',
      'compression'  => sfConfig::get('sf_compressed')      ? 'on' : 'off',
      'tokenizer'    => function_exists('token_get_all')    ? 'on' : 'off',
      'eaccelerator' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable') ? 'on' : 'off',
      'apc'          => extension_loaded('apc') && ini_get('apc.enabled')                  ? 'on' : 'off',
      'xcache'       => extension_loaded('xcache') && ini_get('xcache.cacher')             ? 'on' : 'off',
    );

    $html = '<ul id="sfWebDebugConfigSummary">';
    foreach ($config as $key => $value)
    {
      $html .= '<li class="is'.$value.($key == 'xcache' ? ' last' : '').'">'.$key.'</li>';
    }
    $html .= '</ul>';

    $context = sfContext::getInstance();
    $html .= $this->formatArrayAsHtml('request',  sfDebug::requestAsArray($context->getRequest()));
    $html .= $this->formatArrayAsHtml('response', sfDebug::responseAsArray($context->getResponse()));
    $html .= $this->formatArrayAsHtml('user',     sfDebug::userAsArray($context->getUser()));
    $html .= $this->formatArrayAsHtml('settings', sfDebug::settingsAsArray());
    $html .= $this->formatArrayAsHtml('globals',  sfDebug::globalsAsArray());
    $html .= $this->formatArrayAsHtml('php',      sfDebug::phpInfoAsArray());
    $html .= $this->formatArrayAsHtml('symfony',  sfDebug::symfonyInfoAsArray());

    return $html;
  }

  /**
   * Converts an array to HTML.
   *
   * @param string $id     The identifier to use
   * @param array  $values The array of values
   *
   * @return string An HTML string
   */
  protected function formatArrayAsHtml($id, $values)
  {
    $id = ucfirst(strtolower($id));

    return '
    <h2>'.$id.' <a href="#" onclick="sfWebDebugToggle(\'sfWebDebug'.$id.'\'); return false;"><img src="'.$this->webDebug->getOption('image_root_path').'/toggle.gif" alt="Toggle details" /></a></h2>
    <div id="sfWebDebug'.$id.'" style="display: none"><pre>'.htmlspecialchars(sfYaml::dump(sfDebug::removeObjects($values)), ENT_QUOTES, sfConfig::get('sf_charset')).'</pre></div>
    ';
  }
}
ページが見つかりませんでした – Lumiere Shop
ここを指しているリンクに誤りがあったようです。検索してみるのはいかがですか ?
お買い物カゴ