PythonSingleFFS Class Reference
[File format support]

Generic file format support for Python single dictionary formatted files. More...

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

List of all members.

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()

Detailed Description

Generic file format support for Python single dictionary formatted files.

Definition at line 7 of file PythonSingleFFS.php.


Member Function Documentation

PythonSingleFFS::getFileExtensions (  ) 

Return the commonly used file extensions for these formats.

Include the dot.

Returns:
string[]
Since:
2013-04

Reimplemented from SimpleFFS.

Definition at line 8 of file PythonSingleFFS.php.

static PythonSingleFFS::parseAuthorsFromString ( string  )  [static, protected]

Scans for author comments in the string.

Parameters:
string $string String containing the comments of a section
Returns:
string[] List of authors

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.

Parameters:
$code string
Returns:
array|bool false if the file does not exist
Exceptions:
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().

Here is the call graph for this function:

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.

Parameters:
$data string
Returns:
array
Exceptions:
MWException 

Reimplemented from SimpleFFS.

Definition at line 117 of file PythonSingleFFS.php.

PythonSingleFFS::splitSections ( data,
filename = 'unknown' 
) [protected]
Parameters:
string $data Full file contents
string $filename Full path to file for debugging
Returns:
string[] Sections indexed by language code, or 0 for header section
Exceptions:
MWException 

Definition at line 25 of file PythonSingleFFS.php.

Referenced by read().

Here is the call graph for this function:

PythonSingleFFS::writeReal ( MessageCollection collection  )  [protected]
Parameters:
MessageCollection $collection
Returns:
string

Reimplemented from SimpleFFS.

Definition at line 125 of file PythonSingleFFS.php.

Here is the call graph for this function:


Member Data Documentation

PythonSingleFFS::$cache = array() [static, protected]

Definition at line 17 of file PythonSingleFFS.php.

Referenced by writeReal().


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