private function FilterControllerEvent::varToString in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/symfony/http-kernel/Event/FilterControllerEvent.php \Symfony\Component\HttpKernel\Event\FilterControllerEvent::varToString()
1 call to FilterControllerEvent::varToString()
- FilterControllerEvent::setController in vendor/
symfony/ http-kernel/ Event/ FilterControllerEvent.php - Sets a new controller.
File
- vendor/
symfony/ http-kernel/ Event/ FilterControllerEvent.php, line 69
Class
- FilterControllerEvent
- Allows filtering of a controller callable.
Namespace
Symfony\Component\HttpKernel\EventCode
private function varToString($var) {
if (is_object($var)) {
return sprintf('Object(%s)', get_class($var));
}
if (is_array($var)) {
$a = array();
foreach ($var as $k => $v) {
$a[] = sprintf('%s => %s', $k, $this
->varToString($v));
}
return sprintf('Array(%s)', implode(', ', $a));
}
if (is_resource($var)) {
return sprintf('Resource(%s)', get_resource_type($var));
}
if (null === $var) {
return 'null';
}
if (false === $var) {
return 'false';
}
if (true === $var) {
return 'true';
}
return (string) $var;
}