public function getPanelContent() { $content = array(); if (sfConfig::get('sf_logging_enabled')) { $context = sfContext::getInstance(); $content['request'] = sfDebug::requestAsArray($context->getRequest()); $content['response'] = sfDebug::responseAsArray($context->getResponse()); $content['user'] = sfDebug::userAsArray($context->getUser()); $content['settings'] = sfDebug::settingsAsArray(); $content['globals'] = sfDebug::globalsAsArray(); $content['php'] = sfDebug::phpInfoAsArray(); $content['symfony'] = sfDebug::symfonyInfoAsArray(); } else { $content['Logging disabled'] = array(); } return $content; }
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; }
/** * Returns the current configuration as HTML. * * @return string The current configuration as HTML */ protected function getCurrentConfigAsHtml() { $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', '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', 'compression' => sfConfig::get('sf_compressed') ? 'on' : 'off', 'syck' => extension_loaded('syck') ? 'on' : 'off'); $result = '<ul id="sfWebDebugConfigSummary">'; foreach ($config as $key => $value) { $result .= '<li class="is' . $value . '' . ($key == 'syck' ? ' last' : '') . '">' . $key . '</li>'; } $result .= '</ul>'; $context = sfContext::getInstance(); $result .= $this->formatArrayAsHtml('request', sfDebug::requestAsArray($context->getRequest())); $result .= $this->formatArrayAsHtml('response', sfDebug::responseAsArray($context->getResponse())); $result .= $this->formatArrayAsHtml('settings', sfDebug::settingsAsArray()); $result .= $this->formatArrayAsHtml('globals', sfDebug::globalsAsArray()); $result .= $this->formatArrayAsHtml('php', sfDebug::phpInfoAsArray()); return $result; }
protected function sendConfig() { $context = sfContext::getInstance(); $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', 'request' => sfDebug::removeObjects(sfDebug::requestAsArray($context->getRequest())), 'response' => sfDebug::removeObjects(sfDebug::responseAsArray($context->getResponse())), 'user' => sfDebug::removeObjects(sfDebug::userAsArray($context->getUser())), 'settings' => sfDebug::removeObjects(sfDebug::settingsAsArray()), 'globals' => sfDebug::removeObjects(sfDebug::globalsAsArray()), 'php' => sfDebug::removeObjects(sfDebug::phpInfoAsArray()), 'symfony' => sfDebug::removeObjects(sfDebug::symfonyInfoAsArray())); $this->sfFire->dump('Config', $config); }
public function getCurrentConfigAsArray() { $content = array(); $context = sfContext::getInstance(); $content['request'] = sfDebug::requestAsArray($context->getRequest()); $content['response'] = sfDebug::responseAsArray($context->getResponse()); // $content['user'] = sfDebug::userAsArray($context->getUser()); //not available in symfony 1.0 $content['settings'] = sfDebug::settingsAsArray(); $content['globals'] = sfDebug::globalsAsArray(); $content['php'] = sfDebug::phpInfoAsArray(); // $content['symfony'] = $this->myFormatArrayAsHtml(sfDebug::symfonyInfoAsArray()); not available in symfony 1.0 return $content; }
public function getCurrentConfigAsArray() { $content = array(); $context = sfContext::getInstance(); $content['request'] = sfDebug::requestAsArray($context->getRequest()); $content['response'] = sfDebug::responseAsArray($context->getResponse()); $content['user'] = sfDebug::userAsArray($context->getUser()); $content['settings'] = sfDebug::settingsAsArray(); $content['globals'] = sfDebug::globalsAsArray(); $content['php'] = sfDebug::phpInfoAsArray(); $content['symfony'] = sfDebug::symfonyInfoAsArray(); return $content; }