function YamlDumper::dump
Dumps the service container as an YAML string.
Overrides DumperInterface::dump
File
-
vendor/
symfony/ dependency-injection/ Dumper/ YamlDumper.php, line 45
Class
- YamlDumper
- YamlDumper dumps a service container as a YAML string.
Namespace
Symfony\Component\DependencyInjection\DumperCode
public function dump(array $options = []) : string {
if (!class_exists(YmlDumper::class)) {
throw new LogicException('Unable to dump the container as the Symfony Yaml Component is not installed. Try running "composer require symfony/yaml".');
}
$this->dumper ??= new YmlDumper();
return $this->container
->resolveEnvPlaceholders($this->addParameters() . "\n" . $this->addServices());
}