function PhpConfigDataCollector::collect
File
-
webprofiler/
src/ DataCollector/ PhpConfigDataCollector.php, line 22
Class
- PhpConfigDataCollector
- Provides a data collector to collect all kind of php information.
Namespace
Drupal\webprofiler\DataCollectorCode
public function collect(Request $request, Response $response, \Exception $exception = NULL) {
$this->data = [
'token' => $response->headers
->get('X-Debug-Token'),
'php_version' => PHP_VERSION,
'xdebug_enabled' => extension_loaded('xdebug'),
'xhprof_enabled' => extension_loaded('xhprof'),
'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'),
'sapi_name' => php_sapi_name(),
];
}