\Horde_Yaml_Dumper

Dump PHP data structures to YAML.

Summary

Methods
Properties
Constants
dump()
No public properties found
No constants found
_yamlize()
_yamlizeArray()
_dumpNode()
_doLiteralBlock()
_fold()
$_options
N/A
No private methods found
No private properties found
N/A

Properties

$_options

$_options : 

Type

Methods

dump()

dump(  $value, integer  $options = array()) : string

Dumps PHP array to YAML.

The dump method, when supplied with an array, will do its best to convert the array into valid YAML.

Options: indent: number of spaces to indent children (default 2) wordwrap: wordwrap column number (default 40)

Parameters

$value
integer $options

Options for dumping.

Returns

string —

YAML representation of $value.

_yamlize()

_yamlize(string  $key, string|array  $value, integer  $indent, boolean  $sequence = false) : string

Attempts to convert a key/value array item to YAML.

Parameters

string $key

The name of the key.

string|array $value

The value of the item.

integer $indent

The indent of the current node.

boolean $sequence

Is this an entry of a sequence?

Returns

string

_yamlizeArray()

_yamlizeArray(array  $array, integer  $indent) : string

Attempts to convert an array to YAML

Parameters

array $array

The array you want to convert.

integer $indent

The indent of the current level.

Returns

string

_dumpNode()

_dumpNode(string  $key, string  $value, integer  $indent, boolean  $sequence = false) : string

Returns YAML from a key and a value.

Parameters

string $key

The name of the key.

string $value

The value of the item.

integer $indent

The indent of the current node.

boolean $sequence

Is this an entry of a sequence?

Returns

string

_doLiteralBlock()

_doLiteralBlock(string  $value, integer  $indent) : string

Creates a literal block for dumping.

Parameters

string $value
integer $indent

The value of the indent.

Returns

string

_fold()

_fold(  $value,   $indent) : string

Folds a string of text, if necessary.

Parameters

$value

The string you wish to fold.

$indent

Returns

string