Dumps the value to YAML format
mixed $value:
RuntimeException When trying to dump object or resource
private function dumpValue($value) {
if (is_array($value)) {
$code = array();
foreach ($value as $k => $v) {
$code[$k] = $this
->dumpValue($v);
}
return $code;
}
elseif (is_object($value) && $value instanceof Reference) {
return $this
->getServiceCall((string) $value, $value);
}
elseif (is_object($value) && $value instanceof Parameter) {
return $this
->getParameterCall((string) $value);
}
elseif (is_object($value) || is_resource($value)) {
throw new RuntimeException('Unable to dump a service container if a parameter is an object or a resource.');
}
return $value;
}