Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. YamlDumper.php

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\Dumper

Code

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());
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal