Show PHP SAPI in WDT

This commit is contained in:
Lee McDermott 2013-01-09 10:34:35 +00:00
parent 84e4f4b23f
commit 16b342607c
2 changed files with 15 additions and 0 deletions

View File

@ -35,6 +35,10 @@
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasxdebug ? 'green' : 'red' }}">xdebug</span>
<span class="sf-toolbar-status sf-toolbar-status-{{ collector.hasaccelerator ? 'green' : 'red' }}">accel</span>
</div>
<div class="sf-toolbar-info-piece">
<b>PHP SAPI</b>
<span>{{ collector.sapiName }}</span>
</div>
{% endspaceless %}
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': false } %}

View File

@ -54,6 +54,7 @@ class ConfigDataCollector extends DataCollector
'xcache_enabled' => extension_loaded('xcache') && ini_get('xcache.cacher'),
'wincache_enabled' => extension_loaded('wincache') && ini_get('wincache.ocenabled'),
'bundles' => array(),
'sapi_name' => php_sapi_name()
);
if (isset($this->kernel)) {
@ -188,6 +189,16 @@ class ConfigDataCollector extends DataCollector
return $this->data['bundles'];
}
/**
* Gets the PHP SAPI name.
*
* @return string The environment
*/
public function getSapiName()
{
return $this->data['sapi_name'];
}
/**
* {@inheritdoc}
*/