public function ConfigDataCollector::collect in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php \Symfony\Component\HttpKernel\DataCollector\ConfigDataCollector::collect()
Collects data for the given Request and Response.
Parameters
Request $request A Request instance:
Response $response A Response instance:
\Exception $exception An Exception instance:
Overrides DataCollectorInterface::collect
File
- vendor/
symfony/ http-kernel/ DataCollector/ ConfigDataCollector.php, line 59
Class
- ConfigDataCollector
- ConfigDataCollector.
Namespace
Symfony\Component\HttpKernel\DataCollectorCode
public function collect(Request $request, Response $response, \Exception $exception = null) {
$this->data = array(
'app_name' => $this->name,
'app_version' => $this->version,
'token' => $response->headers
->get('X-Debug-Token'),
'symfony_version' => Kernel::VERSION,
'symfony_state' => 'unknown',
'name' => isset($this->kernel) ? $this->kernel
->getName() : 'n/a',
'env' => isset($this->kernel) ? $this->kernel
->getEnvironment() : 'n/a',
'debug' => isset($this->kernel) ? $this->kernel
->isDebug() : 'n/a',
'php_version' => PHP_VERSION,
'xdebug_enabled' => extension_loaded('xdebug'),
'eaccel_enabled' => extension_loaded('eaccelerator') && ini_get('eaccelerator.enable'),
'apc_enabled' => extension_loaded('apc') && ini_get('apc.enabled'),
'xcache_enabled' => extension_loaded('xcache') && ini_get('xcache.cacher'),
'wincache_enabled' => extension_loaded('wincache') && ini_get('wincache.ocenabled'),
'zend_opcache_enabled' => extension_loaded('Zend OPcache') && ini_get('opcache.enable'),
'bundles' => array(),
'sapi_name' => php_sapi_name(),
);
if (isset($this->kernel)) {
foreach ($this->kernel
->getBundles() as $name => $bundle) {
$this->data['bundles'][$name] = $bundle
->getPath();
}
$this->data['symfony_state'] = $this
->determineSymfonyState();
}
}