Documentation

Dumper
in package

Dumper dumps PHP variables to YAML strings.

Tags
author

Fabien Potencier fabien@symfony.com

final

Table of Contents

Properties

$indentation  : int

Methods

__construct()  : mixed
dump()  : string
Dumps a PHP value to YAML.
canBeDumpedAsLiteralBlock()  : bool
doDump()  : string
dumpBlockScalarLines()  : string
dumpTaggedValue()  : string
getBlockChompingIndicator()  : string
getBlockIndentationIndicator()  : string

Properties

$indentation

private int $indentation = 4

Methods

__construct()

public __construct([int $indentation = 4 ]) : mixed
Parameters
$indentation : int = 4

The amount of spaces to use for indentation of nested nodes

dump()

Dumps a PHP value to YAML.

public dump(mixed $input[, int $inline = 0 ][, int $indent = 0 ][, Yaml::DUMP_*> $flags = 0 ]) : string
Parameters
$input : mixed

The PHP value

$inline : int = 0

The level where you switch to inline YAML

$indent : int = 0

The level of indentation (used internally)

$flags : Yaml::DUMP_*> = 0

A bit field of Yaml::DUMP_* constants to customize the dumped YAML string

Return values
string

canBeDumpedAsLiteralBlock()

private canBeDumpedAsLiteralBlock(string $value) : bool
Parameters
$value : string
Return values
bool

doDump()

private doDump(mixed $input[, int $inline = 0 ][, int $indent = 0 ][, int $flags = 0 ][, int $nestingLevel = 0 ]) : string
Parameters
$input : mixed
$inline : int = 0
$indent : int = 0
$flags : int = 0
$nestingLevel : int = 0
Return values
string

dumpBlockScalarLines()

private dumpBlockScalarLines(string $value, string $prefix) : string
Parameters
$value : string
$prefix : string
Return values
string

dumpTaggedValue()

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

getBlockChompingIndicator()

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

getBlockIndentationIndicator()

private getBlockIndentationIndicator(string $value) : string
Parameters
$value : string
Return values
string
On this page

Search results