Dumper
in package
Dumper dumps PHP variables to YAML strings.
Tags
Table of Contents
- $indentation : int
- The amount of spaces to use for indentation of nested nodes.
- __construct() : mixed
- dump() : string
- Dumps a PHP value to YAML.
- setIndentation() : mixed
- Sets the indentation.
Properties
$indentation
The amount of spaces to use for indentation of nested nodes.
protected
int
$indentation
Methods
__construct()
public
__construct([int $indentation = 4 ]) : mixed
Parameters
- $indentation : int = 4
Return values
mixed —dump()
Dumps a PHP value to YAML.
public
dump(mixed $input, int $inline, int $indent, int $flags) : string
Parameters
- $input : mixed
-
The PHP value
- $inline : int
-
The level where you switch to inline YAML
- $indent : int
-
The level of indentation (used internally)
- $flags : int
-
A bit field of Yaml::DUMP_* constants to customize the dumped YAML string
Return values
string —The YAML representation of the PHP value
setIndentation()
Sets the indentation.
public
setIndentation(int $num) : mixed
Parameters
- $num : int
-
The amount of spaces to use for indentation of nested nodes