Implements support for message storage in YAML format. More...
Public Member Functions | |
getFileExtensions () | |
Return the commonly used file extensions for these formats. | |
readFromVariable ($data) | |
flattenPlural ($value) | |
unflattenPlural ($key, $value) | |
Override this. | |
Protected Member Functions | |
doHeader (MessageCollection $collection) | |
doAuthors (MessageCollection $collection) | |
flatten ($messages) | |
Flattens multidimensional array by using the path to the value as key with each individual key separated by a dot. | |
unflatten ($messages) | |
Performs the reverse operation of flatten. |
Implements support for message storage in YAML format.
This class adds new key into FILES section: codeAsRoot
. If it is set to true, all messages will under language code.
Definition at line 10 of file YamlFFS.php.
YamlFFS::doAuthors | ( | MessageCollection $ | collection | ) | [protected] |
$collection | MessageCollection |
Definition at line 113 of file YamlFFS.php.
YamlFFS::doHeader | ( | MessageCollection $ | collection | ) | [protected] |
$collection | MessageCollection |
Definition at line 92 of file YamlFFS.php.
YamlFFS::flatten | ( | $ | messages | ) | [protected] |
Flattens multidimensional array by using the path to the value as key with each individual key separated by a dot.
$messages | array |
Can as well keep only one copy around.
Definition at line 133 of file YamlFFS.php.
Referenced by readFromVariable().
YamlFFS::flattenPlural | ( | $ | value | ) |
$value |
Reimplemented in RubyYamlFFS.
Definition at line 235 of file YamlFFS.php.
Referenced by flatten().
YamlFFS::getFileExtensions | ( | ) |
Return the commonly used file extensions for these formats.
Include the dot.
Reimplemented from SimpleFFS.
Reimplemented in RubyYamlFFS.
Definition at line 11 of file YamlFFS.php.
YamlFFS::readFromVariable | ( | $ | data | ) |
$data |
Reimplemented from SimpleFFS.
Definition at line 19 of file YamlFFS.php.
YamlFFS::unflatten | ( | $ | messages | ) | [protected] |
Performs the reverse operation of flatten.
Each dot in the key starts a new subarray in the final array.
$messages | array |
Extract the level and make sure it exists.
Update the pointer to the new reference.
If next level is the last, add it into the array.
Definition at line 183 of file YamlFFS.php.
YamlFFS::unflattenPlural | ( | $ | key, | |
$ | value | |||
) |
Override this.
Return false to skip processing this value. Otherwise
$key | string | |
$value | string |
Reimplemented in RubyYamlFFS.
Definition at line 247 of file YamlFFS.php.
Referenced by unflatten().