Generic file format support for JavaScript formatted files. More...
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) |
Generic file format support for JavaScript formatted files.
Definition at line 7 of file JavaScriptFFS.php.
JavaScriptFFS::authorsList | ( | $ | authors | ) | [protected] |
$authors | array |
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.
Reimplemented from SimpleFFS.
Definition at line 8 of file JavaScriptFFS.php.
JavaScriptFFS::header | ( | $ | code, | |
$ | authors | |||
) | [abstract, protected] |
JavaScriptFFS::readFromVariable | ( | $ | data | ) |
$data | 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.
JavaScriptFFS::transformKey | ( | $ | key | ) | [abstract, protected] |
static JavaScriptFFS::unescapeJsString | ( | $ | string | ) | [static, protected] |
$string | string |
Definition at line 201 of file JavaScriptFFS.php.
Referenced by readFromVariable().