Translate extension for MediaWiki
 
Loading...
Searching...
No Matches
AmdFFS Class Reference

AmdFFS implements a message format where messages are encoded as key-value pairs in JSON objects wrapped in a define call. More...

Inheritance diagram for AmdFFS:
SimpleFFS FFS

Public Member Functions

 getFileExtensions ()
 Return the commonly used file extensions for these formats.
 
 readFromVariable ( $data)
 
- Public Member Functions inherited from SimpleFFS
 supportsFuzzy ()
 Query the capabilities of this FFS.
 
 __construct (FileBasedMessageGroup $group)
 
 setGroup (FileBasedMessageGroup $group)
 
 getGroup ()
 
 setWritePath ( $writePath)
 
 getWritePath ()
 
 exists ( $code=false)
 Returns true if the file for this message group in a given language exists.
 
 read ( $code)
 Reads messages from the file in a given language and returns an array of AUTHORS, MESSAGES and possibly other properties.
 
 write (MessageCollection $collection)
 Write the collection to file.
 
 writeIntoVariable (MessageCollection $collection)
 Read a collection and return it as a SimpleFFS formatted string.
 
 filterAuthors (array $authors, $code)
 Remove excluded authors.
 
 isContentEqual ( $a, $b)
 Checks whether two strings are equal.
 
 shouldOverwrite ( $a, $b)
 Allows to skip writing the export output into a file.
 
 isGroupFfsReadable ()
 Check if the file format of the current group is readable by the file format system.
 

Static Public Member Functions

static isValid ( $data)
 
- Static Public Member Functions inherited from SimpleFFS
static fixNewLines ( $data)
 Replaces all Windows and Mac line endings with Unix line endings.
 

Protected Member Functions

 writeReal (MessageCollection $collection)
 
- Protected Member Functions inherited from SimpleFFS
 tryReadSource ( $filename, MessageCollection $collection)
 This tries to pick up external authors in the source files so that they are not lost if those authors are not among those who have translated in the wiki.
 
 tryReadFile ( $filename)
 Read the contents of $filename and return it as a string.
 

Additional Inherited Members

- Protected Attributes inherited from SimpleFFS
 $group
 
 $writePath
 
 $extra
 Stores the FILES section of the YAML configuration, which can be accessed for extra FFS class specific options.
 

Detailed Description

AmdFFS implements a message format where messages are encoded as key-value pairs in JSON objects wrapped in a define call.

Since
2015.02

Definition at line 47 of file AmdFFS.php.

Member Function Documentation

◆ getFileExtensions()

AmdFFS::getFileExtensions ( )

Return the commonly used file extensions for these formats.

Include the dot.

Returns
string[]
Since
2013-04

Reimplemented from SimpleFFS.

Definition at line 58 of file AmdFFS.php.

◆ isValid()

static AmdFFS::isValid ( $data)
static
Parameters
string$data
Returns
bool

Definition at line 53 of file AmdFFS.php.

◆ readFromVariable()

AmdFFS::readFromVariable ( $data)
Parameters
string$data
Returns
array Parsed data.

Reimplemented from SimpleFFS.

Definition at line 66 of file AmdFFS.php.

◆ writeReal()

AmdFFS::writeReal ( MessageCollection $collection)
protected
Parameters
MessageCollection$collection
Returns
string

Reimplemented from SimpleFFS.

Definition at line 90 of file AmdFFS.php.


The documentation for this class was generated from the following file: