mirror of
https://gitlab.com/TheGamecraft/c-cms.git
synced 2026-04-22 11:09:11 -04:00
ALPHA 3.0.2a
This commit is contained in:
@@ -11,14 +11,14 @@
|
||||
|
||||
namespace Symfony\Component\HttpKernel\DataCollector;
|
||||
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\HttpFoundation\Cookie;
|
||||
use Symfony\Component\HttpFoundation\ParameterBag;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
use Symfony\Component\HttpKernel\Event\FilterResponseEvent;
|
||||
use Symfony\Component\HttpKernel\KernelEvents;
|
||||
use Symfony\Component\HttpKernel\Event\FilterControllerEvent;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
|
||||
/**
|
||||
* @author Fabien Potencier <fabien@symfony.com>
|
||||
@@ -42,7 +42,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
$route = '';
|
||||
foreach ($request->attributes->all() as $key => $value) {
|
||||
if ('_route' === $key) {
|
||||
$route = is_object($value) ? $value->getPath() : $value;
|
||||
$route = \is_object($value) ? $value->getPath() : $value;
|
||||
$attributes[$key] = $route;
|
||||
} else {
|
||||
$attributes[$key] = $value;
|
||||
@@ -124,7 +124,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
}
|
||||
|
||||
foreach ($this->data as $key => $value) {
|
||||
if (!is_array($value)) {
|
||||
if (!\is_array($value)) {
|
||||
continue;
|
||||
}
|
||||
if ('request_headers' === $key || 'response_headers' === $key) {
|
||||
@@ -157,7 +157,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
));
|
||||
}
|
||||
|
||||
$this->data['identifier'] = $this->data['route'] ?: (is_array($this->data['controller']) ? $this->data['controller']['class'].'::'.$this->data['controller']['method'].'()' : $this->data['controller']);
|
||||
$this->data['identifier'] = $this->data['route'] ?: (\is_array($this->data['controller']) ? $this->data['controller']['class'].'::'.$this->data['controller']['method'].'()' : $this->data['controller']);
|
||||
|
||||
if ($response->headers->has('x-previous-debug-token')) {
|
||||
$this->data['forward_token'] = $response->headers->get('x-previous-debug-token');
|
||||
@@ -372,25 +372,25 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
*/
|
||||
protected function parseController($controller)
|
||||
{
|
||||
if (is_string($controller) && false !== strpos($controller, '::')) {
|
||||
if (\is_string($controller) && false !== strpos($controller, '::')) {
|
||||
$controller = explode('::', $controller);
|
||||
}
|
||||
|
||||
if (is_array($controller)) {
|
||||
if (\is_array($controller)) {
|
||||
try {
|
||||
$r = new \ReflectionMethod($controller[0], $controller[1]);
|
||||
|
||||
return array(
|
||||
'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0],
|
||||
'class' => \is_object($controller[0]) ? \get_class($controller[0]) : $controller[0],
|
||||
'method' => $controller[1],
|
||||
'file' => $r->getFileName(),
|
||||
'line' => $r->getStartLine(),
|
||||
);
|
||||
} catch (\ReflectionException $e) {
|
||||
if (is_callable($controller)) {
|
||||
if (\is_callable($controller)) {
|
||||
// using __call or __callStatic
|
||||
return array(
|
||||
'class' => is_object($controller[0]) ? get_class($controller[0]) : $controller[0],
|
||||
'class' => \is_object($controller[0]) ? \get_class($controller[0]) : $controller[0],
|
||||
'method' => $controller[1],
|
||||
'file' => 'n/a',
|
||||
'line' => 'n/a',
|
||||
@@ -410,7 +410,7 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
);
|
||||
}
|
||||
|
||||
if (is_object($controller)) {
|
||||
if (\is_object($controller)) {
|
||||
$r = new \ReflectionClass($controller);
|
||||
|
||||
return array(
|
||||
@@ -421,6 +421,6 @@ class RequestDataCollector extends DataCollector implements EventSubscriberInter
|
||||
);
|
||||
}
|
||||
|
||||
return is_string($controller) ? $controller : 'n/a';
|
||||
return \is_string($controller) ? $controller : 'n/a';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user