public function ParameterBag::escapeValue in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/dependency-injection/ParameterBag/ParameterBag.php \Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::escapeValue()
Escape parameter placeholders %.
Parameters
mixed $value:
Return value
mixed
Overrides ParameterBagInterface::escapeValue
File
- vendor/
symfony/ dependency-injection/ ParameterBag/ ParameterBag.php, line 251
Class
- ParameterBag
- Holds parameters.
Namespace
Symfony\Component\DependencyInjection\ParameterBagCode
public function escapeValue($value) {
if (is_string($value)) {
return str_replace('%', '%%', $value);
}
if (is_array($value)) {
$result = array();
foreach ($value as $k => $v) {
$result[$k] = $this
->escapeValue($v);
}
return $result;
}
return $value;
}