Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-kernel/DataCollector/ConfigDataCollector.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 1fec387a4317 |
children |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
9 * file that was distributed with this source code. | 9 * file that was distributed with this source code. |
10 */ | 10 */ |
11 | 11 |
12 namespace Symfony\Component\HttpKernel\DataCollector; | 12 namespace Symfony\Component\HttpKernel\DataCollector; |
13 | 13 |
14 use Symfony\Component\HttpKernel\KernelInterface; | |
15 use Symfony\Component\HttpKernel\Kernel; | |
16 use Symfony\Component\HttpFoundation\Request; | 14 use Symfony\Component\HttpFoundation\Request; |
17 use Symfony\Component\HttpFoundation\Response; | 15 use Symfony\Component\HttpFoundation\Response; |
16 use Symfony\Component\HttpKernel\Kernel; | |
17 use Symfony\Component\HttpKernel\KernelInterface; | |
18 use Symfony\Component\VarDumper\Caster\LinkStub; | 18 use Symfony\Component\VarDumper\Caster\LinkStub; |
19 | 19 |
20 /** | 20 /** |
21 * @author Fabien Potencier <fabien@symfony.com> | 21 * @author Fabien Potencier <fabien@symfony.com> |
22 */ | 22 */ |
52 /** | 52 /** |
53 * {@inheritdoc} | 53 * {@inheritdoc} |
54 */ | 54 */ |
55 public function collect(Request $request, Response $response, \Exception $exception = null) | 55 public function collect(Request $request, Response $response, \Exception $exception = null) |
56 { | 56 { |
57 $this->data = array( | 57 $this->data = [ |
58 'app_name' => $this->name, | 58 'app_name' => $this->name, |
59 'app_version' => $this->version, | 59 'app_version' => $this->version, |
60 'token' => $response->headers->get('X-Debug-Token'), | 60 'token' => $response->headers->get('X-Debug-Token'), |
61 'symfony_version' => Kernel::VERSION, | 61 'symfony_version' => Kernel::VERSION, |
62 'symfony_state' => 'unknown', | 62 'symfony_state' => 'unknown', |
65 'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a', | 65 'debug' => isset($this->kernel) ? $this->kernel->isDebug() : 'n/a', |
66 'php_version' => PHP_VERSION, | 66 'php_version' => PHP_VERSION, |
67 'php_architecture' => PHP_INT_SIZE * 8, | 67 'php_architecture' => PHP_INT_SIZE * 8, |
68 'php_intl_locale' => class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a', | 68 'php_intl_locale' => class_exists('Locale', false) && \Locale::getDefault() ? \Locale::getDefault() : 'n/a', |
69 'php_timezone' => date_default_timezone_get(), | 69 'php_timezone' => date_default_timezone_get(), |
70 'xdebug_enabled' => extension_loaded('xdebug'), | 70 'xdebug_enabled' => \extension_loaded('xdebug'), |
71 'apcu_enabled' => extension_loaded('apcu') && ini_get('apc.enabled'), | 71 'apcu_enabled' => \extension_loaded('apcu') && filter_var(ini_get('apc.enabled'), FILTER_VALIDATE_BOOLEAN), |
72 'zend_opcache_enabled' => extension_loaded('Zend OPcache') && ini_get('opcache.enable'), | 72 'zend_opcache_enabled' => \extension_loaded('Zend OPcache') && filter_var(ini_get('opcache.enable'), FILTER_VALIDATE_BOOLEAN), |
73 'bundles' => array(), | 73 'bundles' => [], |
74 'sapi_name' => PHP_SAPI, | 74 'sapi_name' => \PHP_SAPI, |
75 ); | 75 ]; |
76 | 76 |
77 if (isset($this->kernel)) { | 77 if (isset($this->kernel)) { |
78 foreach ($this->kernel->getBundles() as $name => $bundle) { | 78 foreach ($this->kernel->getBundles() as $name => $bundle) { |
79 $this->data['bundles'][$name] = $this->hasVarDumper ? new LinkStub($bundle->getPath()) : $bundle->getPath(); | 79 $this->data['bundles'][$name] = $this->hasVarDumper ? new LinkStub($bundle->getPath()) : $bundle->getPath(); |
80 } | 80 } |
96 /** | 96 /** |
97 * {@inheritdoc} | 97 * {@inheritdoc} |
98 */ | 98 */ |
99 public function reset() | 99 public function reset() |
100 { | 100 { |
101 $this->data = array(); | 101 $this->data = []; |
102 } | 102 } |
103 | 103 |
104 public function lateCollect() | 104 public function lateCollect() |
105 { | 105 { |
106 $this->data = $this->cloneVar($this->data); | 106 $this->data = $this->cloneVar($this->data); |