Interface for file system support classes. More...
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. |
Interface for file system support classes.
Definition at line 19 of file FFS.php.
FFS::__construct | ( | FileBasedMessageGroup $ | group | ) |
FFS::getFileExtensions | ( | ) |
Return the commonly used file extensions for these formats.
Include the dot.
Implemented in AndroidXmlFFS, DtdFFS, SimpleFFS, FlatPhpFFS, GettextFFS, IniFFS, JavaFFS, JavaScriptFFS, JsonFFS, MediaWikiExtensionFFS, PythonSingleFFS, RubyYamlFFS, XliffFFS, and YamlFFS.
FFS::getWritePath | ( | ) |
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
.
$code | String Languge code. |
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.
$data | String Formatted messages. |
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.
$target | String Filesystem path for exported files. |
Implemented in SimpleFFS.
FFS::supportsFuzzy | ( | ) |
Query the capabilities of this FFS.
Allowed values are:
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.
$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.
$collection | MessageCollection |
Implemented in SimpleFFS.