function Yaml::dump
Dumps a PHP value to a YAML string.
The dump method, when supplied with an array, will do its best to convert the array into friendly YAML.
Parameters
mixed $input The PHP value:
int $inline The level where you switch to inline YAML:
int $indent The amount of spaces to use for indentation of nested nodes:
int-mask-of<self::DUMP_*> $flags A bit field of DUMP_* constants to customize the dumped YAML string:
2 calls to Yaml::dump()
- FailureMarker::write in core/
modules/ package_manager/ src/ FailureMarker.php - Writes data to marker file.
- PerformanceTestRecorder::registerService in core/
lib/ Drupal/ Core/ Test/ PerformanceTestRecorder.php - Registers core.performance.test.recorder service.
File
-
vendor/
symfony/ yaml/ Yaml.php, line 91
Class
- Yaml
- Yaml offers convenience methods to load and dump YAML.
Namespace
Symfony\Component\YamlCode
public static function dump(mixed $input, int $inline = 2, int $indent = 4, int $flags = 0) : string {
$yaml = new Dumper($indent);
return $yaml->dump($input, $inline, 0, $flags);
}