YAML
Less than 1 minute
YAML
Lightweight YAML parser for simple key/value and list structures.
class YAMLMethods
__construct
Creates a YAML parser instance.
public __construct(): voidparseFile
Parses a YAML file into an array structure.
public parseFile(string $filename, false $): voidParameters
| Parameter | Type | Description |
|---|---|---|
$filename | string | filename to read and parse |
$ | false |
parse
Parses YAML text content into an array structure.
public parse(string $content): voidParameters
| Parameter | Type | Description |
|---|---|---|
$content | string | YAML content to parse |
parseSection
Parses a YAML section recursively into the target parent array.
private parseSection(array $iter, array $parent, int $level, array $indents): voidParameters
| Parameter | Type | Description |
|---|---|---|
$iter | array | line iterator by reference |
$parent | array | parent output node being populated |
$level | int | current nesting level |
$indents | array | indentation history by level |
Generated by Hazaar API Doc Generator on Tue, 21 Apr 2026 04:00:25 +0000