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>
$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;
}
foreach ($this->data as $key => $value) {
- if (!is_array($value)) {
+ if (!\is_array($value)) {
continue;
}
if ('request_headers' === $key || 'response_headers' === $key) {
));
}
- $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']);
}
public function lateCollect()
*/
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',
);
}
- if (is_object($controller)) {
+ if (\is_object($controller)) {
$r = new \ReflectionClass($controller);
return array(
);
}
- return is_string($controller) ? $controller : 'n/a';
+ return \is_string($controller) ? $controller : 'n/a';
}
}