51Degrees Pipeline for PHP

fiftyone\pipeline\translation\YamlMap Class Reference

Detailed Description

Minimal parser for the flat "key: value" YAML maps used by the country translation files.

The files contain one mapping per line and no nesting, so a full YAML library is not required. Insertion order is preserved (PHP associative arrays are ordered), which matters because the country code file order defines the order of all known countries.

Static Public Member Functions

static parse (string $content)
static parseFile (string $path)
 Parse a file, returning an empty map if it cannot be read.

Member Function Documentation

◆ parse()

fiftyone\pipeline\translation\YamlMap::parse ( string $content)
static
Returns
array<string, string>

◆ parseFile()

fiftyone\pipeline\translation\YamlMap::parseFile ( string $path)
static

Parse a file, returning an empty map if it cannot be read.

Returns
array<string, string>