Generic file format support for Python single dictionary formatted files. More...
Public Member Functions | |
getFileExtensions () | |
Return the commonly used file extensions for these formats. | |
read ($code) | |
Reads messages from the file in a given language and returns an array of AUTHORS, MESSAGES and possibly other properties. | |
readFromVariable ($data) | |
Parse the message data given as a string in the SimpleFFS format and return it as an array of AUTHORS and MESSAGES. | |
Protected Member Functions | |
splitSections ($data, $filename= 'unknown') | |
parseFile () | |
writeReal (MessageCollection $collection) | |
Static Protected Member Functions | |
static | parseAuthorsFromString ($string) |
Scans for author comments in the string. | |
Static Protected Attributes | |
static | $cache = array() |
Generic file format support for Python single dictionary formatted files.
Definition at line 7 of file PythonSingleFFS.php.
PythonSingleFFS::getFileExtensions | ( | ) |
Return the commonly used file extensions for these formats.
Include the dot.
Reimplemented from SimpleFFS.
Definition at line 8 of file PythonSingleFFS.php.
static PythonSingleFFS::parseAuthorsFromString | ( | $ | string | ) | [static, protected] |
Scans for author comments in the string.
string | $string String containing the comments of a section |
Definition at line 210 of file PythonSingleFFS.php.
Referenced by writeReal().
PythonSingleFFS::parseFile | ( | ) | [protected] |
Definition at line 92 of file PythonSingleFFS.php.
Referenced by read().
PythonSingleFFS::read | ( | $ | code | ) |
Reads messages from the file in a given language and returns an array of AUTHORS, MESSAGES and possibly other properties.
$code | string |
MWException | if the file appears to exist, but cannot be read |
Reimplemented from SimpleFFS.
Definition at line 63 of file PythonSingleFFS.php.
Referenced by writeReal().
PythonSingleFFS::readFromVariable | ( | $ | data | ) |
Parse the message data given as a string in the SimpleFFS format and return it as an array of AUTHORS and MESSAGES.
$data | string |
MWException |
Reimplemented from SimpleFFS.
Definition at line 117 of file PythonSingleFFS.php.
PythonSingleFFS::splitSections | ( | $ | data, | |
$ | filename = 'unknown' | |||
) | [protected] |
string | $data Full file contents | |
string | $filename Full path to file for debugging |
MWException |
Definition at line 25 of file PythonSingleFFS.php.
Referenced by read().
PythonSingleFFS::writeReal | ( | MessageCollection $ | collection | ) | [protected] |
MessageCollection | $collection |
Reimplemented from SimpleFFS.
Definition at line 125 of file PythonSingleFFS.php.
PythonSingleFFS::$cache = array() [static, protected] |
Definition at line 17 of file PythonSingleFFS.php.
Referenced by writeReal().