protected function PhpArrayDumper::prepareParameters in Service Container 7
Same name and namespace in other branches
- 7.2 lib/Drupal/Core/DependencyInjection/Dumper/PhpArrayDumper.php \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper::prepareParameters()
Prepares parameters.
Parameters
array $parameters:
bool $escape:
Return value
array
1 call to PhpArrayDumper::prepareParameters()
- PhpArrayDumper::getParameters in lib/
Drupal/ Core/ DependencyInjection/ Dumper/ PhpArrayDumper.php - Returns parameters of the container as a PHP Array.
File
- lib/
Drupal/ Core/ DependencyInjection/ Dumper/ PhpArrayDumper.php, line 98 - Contains \Drupal\Core\DependencyInjection\Dumper\PhpArrayDumper
Class
- PhpArrayDumper
- PhpArrayDumper dumps a service container as a serialized PHP array.
Namespace
Drupal\Core\DependencyInjection\DumperCode
protected function prepareParameters($parameters, $escape = true) {
$filtered = array();
foreach ($parameters as $key => $value) {
if (is_array($value)) {
$value = $this
->prepareParameters($value, $escape);
}
elseif ($value instanceof Reference) {
$value = '@' . $value;
}
$filtered[$key] = $value;
}
return $escape ? $this
->escape($filtered) : $filtered;
}