YamlFFS Class Reference
[File format support]

Implements support for message storage in YAML format. More...

Inheritance diagram for YamlFFS:
Inheritance graph
[legend]
Collaboration diagram for YamlFFS:
Collaboration graph
[legend]

List of all members.

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.

Detailed Description

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.


Member Function Documentation

YamlFFS::doAuthors ( MessageCollection collection  )  [protected]
Parameters:
$collection MessageCollection
Returns:
string

Definition at line 113 of file YamlFFS.php.

Here is the call graph for this function:

YamlFFS::doHeader ( MessageCollection collection  )  [protected]
Parameters:
$collection MessageCollection
Returns:
string

Definition at line 92 of file YamlFFS.php.

Here is the call graph for this function:

YamlFFS::flatten ( messages  )  [protected]

Flattens multidimensional array by using the path to the value as key with each individual key separated by a dot.

Parameters:
$messages array
Returns:
array

Can as well keep only one copy around.

Definition at line 133 of file YamlFFS.php.

Referenced by readFromVariable().

Here is the call graph for this function:

YamlFFS::flattenPlural ( value  ) 
Parameters:
$value 
Returns:
bool

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.

Returns:
string[]
Since:
2013-04

Reimplemented from SimpleFFS.

Reimplemented in RubyYamlFFS.

Definition at line 11 of file YamlFFS.php.

YamlFFS::readFromVariable ( data  ) 
Parameters:
$data 
Returns:
array

Reimplemented from SimpleFFS.

Definition at line 19 of file YamlFFS.php.

Here is the call graph for this function:

YamlFFS::unflatten ( messages  )  [protected]

Performs the reverse operation of flatten.

Each dot in the key starts a new subarray in the final array.

Parameters:
$messages array
Returns:
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.

Here is the call graph for this function:

YamlFFS::unflattenPlural ( key,
value 
)

Override this.

Return false to skip processing this value. Otherwise

Parameters:
$key string
$value string
Returns:
array with keys and values.

Reimplemented in RubyYamlFFS.

Definition at line 247 of file YamlFFS.php.

Referenced by unflatten().


The documentation for this class was generated from the following file:
Generated on Tue Oct 29 00:00:57 2013 for MediaWiki Translate Extension by  doxygen 1.6.3