AppleFFS class implements support for Apple .strings files.
More...
|
static | readRow ( $line) |
| Parses non-empty strings file row to key and value.
|
|
static | writeRow ( $key, $value) |
| Writes well-formed properties file row with key and value.
|
|
static | getExtraSchema () |
|
static | fixNewLines ( $data) |
| Replaces all Windows and Mac line endings with Unix line endings.
|
|
|
static | quoteString ( $str) |
| Quote and escape Obj-C-style strings for .strings format.
|
|
static | escapeString ( $str) |
| Escape Obj-C-style strings; use backslash-escapes etc.
|
|
static | unescapeString ( $str) |
| Unescape Obj-C-style strings; can include backslash-escapes.
|
|
|
| $group |
|
| $writePath |
|
| $extra |
| Stores the FILES section of the YAML configuration, which can be accessed for extra FFS class specific options.
|
|
AppleFFS class implements support for Apple .strings files.
This class reads and writes only UTF-8 files.
This class has not yet been battle-tested, so beware.
- Author
- Brion Vibber bvibb.nosp@m.er@w.nosp@m.ikime.nosp@m.dia..nosp@m.org
- Since
- 2014.02
Definition at line 14 of file AppleFFS.php.
◆ doAuthors()
◆ doHeader()
◆ escapeString()
static AppleFFS::escapeString |
( |
| $str | ) |
|
|
staticprotected |
Escape Obj-C-style strings; use backslash-escapes etc.
- Parameters
-
- Returns
- string
Definition at line 162 of file AppleFFS.php.
◆ getExtraSchema()
static AppleFFS::getExtraSchema |
( |
| ) |
|
|
static |
◆ getFileExtensions()
AppleFFS::getFileExtensions |
( |
| ) |
|
Return the commonly used file extensions for these formats.
Include the dot.
- Returns
- string[]
- Since
- 2013-04
Reimplemented from SimpleFFS.
Definition at line 19 of file AppleFFS.php.
◆ quoteString()
static AppleFFS::quoteString |
( |
| $str | ) |
|
|
staticprotected |
Quote and escape Obj-C-style strings for .strings format.
- Parameters
-
- Returns
- string
Definition at line 152 of file AppleFFS.php.
◆ readFromVariable()
AppleFFS::readFromVariable |
( |
| $data | ) |
|
- Parameters
-
- Returns
- array Parsed data.
- Exceptions
-
Reimplemented from SimpleFFS.
Definition at line 28 of file AppleFFS.php.
◆ readRow()
static AppleFFS::readRow |
( |
| $line | ) |
|
|
static |
Parses non-empty strings file row to key and value.
Can be overridden by child classes.
- Parameters
-
- Exceptions
-
- Returns
- array array( string $key, string $val )
Reimplemented in AppleInfoPlistFfs.
Definition at line 82 of file AppleFFS.php.
◆ supportsFuzzy()
AppleFFS::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
Reimplemented from SimpleFFS.
Definition at line 15 of file AppleFFS.php.
◆ unescapeString()
static AppleFFS::unescapeString |
( |
| $str | ) |
|
|
staticprotected |
Unescape Obj-C-style strings; can include backslash-escapes.
- Todo
- support \UXXXX
- Parameters
-
- Returns
- string
Definition at line 176 of file AppleFFS.php.
◆ writeReal()
◆ writeRow()
static AppleFFS::writeRow |
( |
| $key, |
|
|
| $value ) |
|
static |
Writes well-formed properties file row with key and value.
Can be overridden by child classes.
- Parameters
-
- Returns
- string
Reimplemented in AppleInfoPlistFfs.
Definition at line 142 of file AppleFFS.php.
The documentation for this class was generated from the following file: