public function YamlDumper::dump in Service Container 7
Same name and namespace in other branches
- 7.2 modules/providers/service_container_symfony/lib/Symfony/Component/DependencyInjection/Dumper/YamlDumper.php \Symfony\Component\DependencyInjection\Dumper\YamlDumper::dump()
Dumps the service container as an YAML string.
@api
Parameters
array $options An array of options:
Return value
string A YAML string representing of the service container
Overrides DumperInterface::dump
File
- modules/
providers/ service_container_symfony/ lib/ Symfony/ Component/ DependencyInjection/ Dumper/ YamlDumper.php, line 43
Class
- YamlDumper
- YamlDumper dumps a service container as a YAML string.
Namespace
Symfony\Component\DependencyInjection\DumperCode
public function dump(array $options = array()) {
if (!class_exists('Symfony\\Component\\Yaml\\Dumper')) {
throw new RuntimeException('Unable to dump the container as the Symfony Yaml Component is not installed.');
}
if (null === $this->dumper) {
$this->dumper = new YmlDumper();
}
return $this
->addParameters() . "\n" . $this
->addServices();
}