Documentation

Dumper
in package

Dumper dumps PHP variables to YAML strings.

Tags
author

Fabien Potencier fabien@symfony.com

final

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.
dumpTaggedValue()  : string
getBlockIndentationIndicator()  : string

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

dumpTaggedValue()

private dumpTaggedValue(TaggedValue $value, int $inline, int $indent, int $flags, string $prefix) : string
Parameters
$value : TaggedValue
$inline : int
$indent : int
$flags : int
$prefix : string
Return values
string

getBlockIndentationIndicator()

private getBlockIndentationIndicator(string $value) : string
Parameters
$value : string
Return values
string

Search results