Class

Symfony\Component\Yaml\Dumper

class Dumper

Dumper dumps PHP variables to YAML strings.

Methods

setIndentation(integer $num)

Sets the indentation.

string dump(mixed $input, integer $inline, integer $indent, Boolean $exceptionOnInvalidType = false, Boolean $objectSupport = false)

Dumps a PHP value to YAML.

Details

at line 33
public setIndentation(integer $num)

Sets the indentation.

Parameters

integer $num The amount of spaces to use for indentation of nested nodes.

at line 49
public string dump(mixed $input, integer $inline, integer $indent, Boolean $exceptionOnInvalidType = false, Boolean $objectSupport = false)

Dumps a PHP value to YAML.

Parameters

mixed $input The PHP value
integer $inline The level where you switch to inline YAML
integer $indent The level of indentation (used internally)
Boolean $exceptionOnInvalidType true if an exception must be thrown on invalid types (a PHP resource or object), false otherwise
Boolean $objectSupport true if object support is enabled, false otherwise

Return Value

string The YAML representation of the PHP value