Yaml

Implements FormatInterface

YAML format handler for Registry.

since

1.0.0

package

Joomla Framework

Methods

__construct

Construct to set up the parser and dumper

__construct() : 
since

1.0.0

Response

mixed

objectToString

Converts an object into a YAML formatted string.

objectToString(object|array object, mixed||string|int options = []) : 

We use json_* to convert the passed object to an array.

since

1.0.0

Arguments

object

object|array<string|int, mixed>Data source object.

options

array<string|int, mixed>Options used by the formatter.

Response

stringYAML formatted string.

stringToObject

Parse a YAML formatted string and convert it into an object.

stringToObject( data, mixed||string|int options = []) : 

We use the json_* methods to convert the parsed YAML array to an object.

since

1.0.0

Arguments

data

stringYAML formatted string to convert.

options

array<string|int, mixed>Options used by the formatter.

Response

objectData object.

Properties

parser

The YAML parser class.

since

1.0.0

Type(s)

Parser

dumper

The YAML dumper class.

since

1.0.0

Type(s)

Dumper