Copied!

Encodes YAML data.

CloneableInstantiable
Constants
public Symfony\Component\Serializer\Encoder\YamlEncoder::FORMAT = 'yaml'
public Symfony\Component\Serializer\Encoder\YamlEncoder::PRESERVE_EMPTY_OBJECTS = 'preserve_empty_objects'
public Symfony\Component\Serializer\Encoder\YamlEncoder::YAML_FLAGS = 'yaml_flags'
public Symfony\Component\Serializer\Encoder\YamlEncoder::YAML_INDENT = 'yaml_indent'
 

Initial indentation for root element.

public Symfony\Component\Serializer\Encoder\YamlEncoder::YAML_INDENTATION = 'yaml_indentation'
 

Override the amount of spaces to use for indentation of nested nodes.

This option only works in the constructor, not in calls to encode.

public Symfony\Component\Serializer\Encoder\YamlEncoder::YAML_INLINE = 'yaml_inline'
Methods
public __construct(?Symfony\Component\Yaml\Dumper $dumper = NULL, ?Symfony\Component\Yaml\Parser $parser = NULL, array $defaultContext = [])
public decode(string $data, string $format, array $context = []) : ?mixed
public encode(?mixed $data, string $format, array $context = []) : string
public supportsDecoding(string $format) : bool
public supportsEncoding(string $format) : bool
Constants
private Symfony\Component\Serializer\Encoder\YamlEncoder::ALTERNATIVE_FORMAT = 'yml'
Properties
private array $defaultContext = ['yaml_inline' => 0, 'yaml_indent' => 0, 'yaml_flags' => 0]
private readonly Symfony\Component\Yaml\Dumper $dumper
private readonly Symfony\Component\Yaml\Parser $parser
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration