MediaWikiExtensionFFS Class Reference
[File format support]

Manipulates ExtensionName.i18n.php style files. More...

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

List of all members.

Public Member Functions

 supportsFuzzy ()
 Query the capabilities of this FFS.
 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')
 writeReal (MessageCollection $collection)

Static Protected Member Functions

static parseAuthorsFromString ($string)
 Scans for @author tags in the string.
static quote ($value)
 Tries to find optimal way to quote a string by choosing either double quotes or single quotes depending on how many escapes are needed.

Static Protected Attributes

static $cache = array()

Detailed Description

Manipulates ExtensionName.i18n.php style files.

Since:
2012-10-20

Definition at line 17 of file MediaWikiExtensionFFS.php.


Member Function Documentation

MediaWikiExtensionFFS::getFileExtensions (  ) 

Return the commonly used file extensions for these formats.

Include the dot.

Returns:
string[]
Since:
2013-04

Reimplemented from SimpleFFS.

Definition at line 22 of file MediaWikiExtensionFFS.php.

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

Scans for @author tags in the string.

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

Definition at line 229 of file MediaWikiExtensionFFS.php.

Referenced by writeReal().

static MediaWikiExtensionFFS::quote ( value  )  [static, protected]

Tries to find optimal way to quote a string by choosing either double quotes or single quotes depending on how many escapes are needed.

Parameters:
string $value The string to quote.
Returns:
string String suitable for inclusion in PHP code

Definition at line 242 of file MediaWikiExtensionFFS.php.

MediaWikiExtensionFFS::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 75 of file MediaWikiExtensionFFS.php.

Referenced by writeReal().

Here is the call graph for this function:

MediaWikiExtensionFFS::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 107 of file MediaWikiExtensionFFS.php.

Referenced by read().

MediaWikiExtensionFFS::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 39 of file MediaWikiExtensionFFS.php.

Referenced by read().

Here is the call graph for this function:

MediaWikiExtensionFFS::supportsFuzzy (  ) 

Query the capabilities of this FFS.

Allowed values are:

  • yes
  • write (ignored on read)
  • no (stripped on write)
    Returns:
    string
    Since:
    2013-03-05

Reimplemented from SimpleFFS.

Definition at line 18 of file MediaWikiExtensionFFS.php.

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

$name ($native)$authorList

Reimplemented from SimpleFFS.

Definition at line 129 of file MediaWikiExtensionFFS.php.

Here is the call graph for this function:


Member Data Documentation

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

Definition at line 31 of file MediaWikiExtensionFFS.php.

Referenced by read(), and writeReal().


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