class Dumper

Dumper dumps PHP variables to YAML strings.

Methods

__construct(int $indentation = 4)

No description

setIndentation(int $num)

Sets the indentation.

string
dump(mixed $input, int $inline, int $indent, int $flags)

Dumps a PHP value to YAML.

Details

at line line 31
__construct(int $indentation = 4)

Parameters

int $indentation

at line line 45
setIndentation(int $num)

Sets the indentation.

Parameters

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

at line line 62
string dump(mixed $input, int $inline, int $indent, int $flags)

Dumps a PHP value to YAML.

Parameters

mixed $input The PHP value
int $inline The level where you switch to inline YAML
int $indent The level of indentation (used internally)
int $flags A bit field of Yaml::DUMP_* constants to customize the dumped YAML string

Return Value

string The YAML representation of the PHP value