public function ParameterBag::unescapeValue in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php \Symfony\Component\DependencyInjection\ParameterBag\ParameterBag::unescapeValue()
Unescape parameter placeholders %.
Parameters
mixed $value:
Return value
mixed
Overrides ParameterBagInterface::unescapeValue
1 call to ParameterBag::unescapeValue()
- ParameterBag::resolve in modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ParameterBag/ ParameterBag.php - Replaces parameter placeholders (%name%) by their values for all parameters.
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ ParameterBag/ ParameterBag.php, line 287
Class
- ParameterBag
- Holds parameters.
Namespace
Symfony\Component\DependencyInjection\ParameterBagCode
public function unescapeValue($value) {
if (is_string($value)) {
return str_replace('%%', '%', $value);
}
if (is_array($value)) {
$result = array();
foreach ($value as $k => $v) {
$result[$k] = $this
->unescapeValue($v);
}
return $result;
}
return $value;
}