FFS Interface Reference
[File format support]

Interface for file system support classes. More...

Inheritance diagram for FFS:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct (FileBasedMessageGroup $group)
 setWritePath ($target)
 Set the file's location in the system.
 getWritePath ()
 Get the file's location in the system.
 read ($code)
 Will parse messages, authors, and any custom data from the file and return it in associative array with keys like AUTHORS and MESSAGES.
 readFromVariable ($data)
 Same as read(), but takes the data as a parameter.
 write (MessageCollection $collection)
 Writes to the location provided with setWritePath and group specific directory structure.
 writeIntoVariable (MessageCollection $collection)
 Quick shortcut for getting the plain exported data.
 supportsFuzzy ()
 Query the capabilities of this FFS.
 getFileExtensions ()
 Return the commonly used file extensions for these formats.

Detailed Description

Interface for file system support classes.

Definition at line 19 of file FFS.php.


Constructor & Destructor Documentation

FFS::__construct ( FileBasedMessageGroup group  ) 

Implemented in SimpleFFS, and JavaFFS.


Member Function Documentation

FFS::getFileExtensions (  ) 

Return the commonly used file extensions for these formats.

Include the dot.

Returns:
string[]
Since:
2013-04

Implemented in AndroidXmlFFS, DtdFFS, SimpleFFS, FlatPhpFFS, GettextFFS, IniFFS, JavaFFS, JavaScriptFFS, JsonFFS, MediaWikiExtensionFFS, PythonSingleFFS, RubyYamlFFS, XliffFFS, and YamlFFS.

FFS::getWritePath (  ) 

Get the file's location in the system.

Returns:
  String  

Implemented in SimpleFFS.

FFS::read ( code  ) 

Will parse messages, authors, and any custom data from the file and return it in associative array with keys like AUTHORS and MESSAGES.

Parameters:
$code   String   Languge code.
Returns:
array of string|mixed Parsed data.

Implemented in SimpleFFS, MediaWikiExtensionFFS, PythonSingleFFS, and XliffFFS.

FFS::readFromVariable ( data  ) 

Same as read(), but takes the data as a parameter.

The caller is supposed to know in what language the translations are.

Parameters:
$data   String   Formatted messages.
Returns:
array of string|mixed Parsed data.

Implemented in AndroidXmlFFS, DtdFFS, SimpleFFS, FlatPhpFFS, GettextFFS, IniFFS, JavaFFS, JavaScriptFFS, JsonFFS, MediaWikiExtensionFFS, PythonSingleFFS, and YamlFFS.

FFS::setWritePath ( target  ) 

Set the file's location in the system.

Parameters:
$target   String   Filesystem path for exported files.

Implemented in SimpleFFS.

FFS::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

Implemented in AndroidXmlFFS, SimpleFFS, GettextFFS, IniFFS, JavaFFS, MediaWikiExtensionFFS, and XliffFFS.

FFS::write ( MessageCollection collection  ) 

Writes to the location provided with setWritePath and group specific directory structure.

Exports translations included in the given collection with any special handling needed.

Parameters:
$collection MessageCollection

Implemented in SimpleFFS.

FFS::writeIntoVariable ( MessageCollection collection  ) 

Quick shortcut for getting the plain exported data.

Same as write(), but returns the output instead of writing it into a file.

Parameters:
$collection MessageCollection
Returns:
  String  

Implemented in SimpleFFS.


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