JavaScriptFFS Class Reference
[File format support]

Generic file format support for JavaScript formatted files. More...

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

List of all members.

Public Member Functions

 getFileExtensions ()
 Return the commonly used file extensions for these formats.
 readFromVariable ($data)

Protected Member Functions

 transformKey ($key)
 Message keys format.
 header ($code, $authors)
 Header of message file.
 footer ()
 Footer of message file.
 authorsList ($authors)

Static Protected Member Functions

static unescapeJsString ($string)

Detailed Description

Generic file format support for JavaScript formatted files.

Definition at line 7 of file JavaScriptFFS.php.


Member Function Documentation

JavaScriptFFS::authorsList ( authors  )  [protected]
Parameters:
$authors array
Returns:
string

Definition at line 183 of file JavaScriptFFS.php.

Referenced by ShapadoJsFFS::header().

JavaScriptFFS::footer (  )  [abstract, protected]

Footer of message file.

Reimplemented in ShapadoJsFFS.

JavaScriptFFS::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 JavaScriptFFS.php.

JavaScriptFFS::header ( code,
authors 
) [abstract, protected]

Header of message file.

Parameters:
$code string
$authors array

Reimplemented in ShapadoJsFFS.

JavaScriptFFS::readFromVariable ( data  ) 
Parameters:
$data array
Returns:
array

Find the start and end of the data section (enclosed in curly braces).

Strip everything outside of the data section.

Strip comments.

Replace message endings with double quotes.

Strip excess whitespace.

Per-key message processing.

Break in to segments.

Add back trailing quote, removed by explosion.

Concatenate separated strings.

Remove line breaks between message keys and messages.

Break in to key and message.

Strip excess whitespace from key and value, then quotation marks.

Unescape any JavaScript string syntax and append to message array.

Reimplemented from SimpleFFS.

Definition at line 38 of file JavaScriptFFS.php.

Here is the call graph for this function:

JavaScriptFFS::transformKey ( key  )  [abstract, protected]

Message keys format.

Parameters:
$key string
Returns:
string

Reimplemented in ShapadoJsFFS.

static JavaScriptFFS::unescapeJsString ( string  )  [static, protected]
Parameters:
$string string
Returns:
string

Definition at line 201 of file JavaScriptFFS.php.

Referenced by readFromVariable().


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