[ Index ] |
PHP Cross Reference of GlotPress |
[Source view] [Print] [Project Stats]
(no description)
File Size: | 532 lines (16 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
GP_Format_Properties:: (13 methods):
print_exported_file()
utf8_uni_encode()
ascii_uni_encode()
uni_decode()
uni_decode_callback()
ordutf8()
split_properties_line()
read_translations_from_file()
read_originals_from_file()
sort_entries()
unescape()
escape()
escape_key()
Class: GP_Format_Properties - X-Ref
print_exported_file( $project, $locale, $translation_set, $entries ) X-Ref |
Generates a string the contains the $entries to export in the Properties file format. return: string param: GP_Project $project The project the strings are being exported for, not used param: GP_Locale $locale The locale object the strings are being exported for. not used param: GP_Translation_Set $translation_set The locale object the strings are being param: GP_Translation $entries The entries to export. since: 2.0.0 |
utf8_uni_encode( $string ) X-Ref |
Encodes a PHP string in UTF8 format to a unicode escaped string (multi-byte characters are encoded in the \uXXXX format). return: string param: $string string The string to encode. since: 2.0.0 |
ascii_uni_encode( $string ) X-Ref |
Encodes a PHP string in ascii format to a unicode escaped string (multi-byte characters are encoded in the \uXXXX format). return: string param: string $string The string to encode. since: 2.0.0 |
uni_decode( $string ) X-Ref |
Decodes a unicode escaped string to a PHP string. return: string param: string $string The string to decode. since: 2.0.0 |
uni_decode_callback( $matches ) X-Ref |
Part of uni_decode(), this is the call back function that does the heavy lifting of converting a \uXXXX value to a UTF-8 encoded character sequence. return: string param: array $matches The array of matches from preg_replace_callback(). since: 2.0.0 |
ordutf8( $string, &$offset ) X-Ref |
Part of utf8_uni_encode(), this returns the character value of a UTF-8 encoded string. From http://php.net/manual/en/function.ord.php#109812 return: int|bool param: string $string The UTF-8 string to process. param: int $offset The offset of the string to return the character value of. since: 2.0.0 |
split_properties_line( $line, &$key, &$value ) X-Ref |
Splits a properties file line on the = or : character. Skips escaped values (\= or \:) in the key and matches the first unescaped instance. return: bool Returns true if the line was split successfully, false otherwise. param: string $line The line to split. param: string $key The key part of the properties file string if found. param: string $value The value part of the properties file string if found. since: 2.0.0 |
read_translations_from_file( $file_name, $project = null ) X-Ref |
Reads a set of translations from a properties file. return: Translations|bool param: string $file_name The filename of the uploaded properties file. param: GP_Project $project The project object to read the translations in to. since: 2.0.0 |
read_originals_from_file( $file_name ) X-Ref |
Reads a set of original strings from a properties file. return: Translations|bool param: string $file_name The filename of the uploaded properties file. since: 2.0.0 |
sort_entries( $a, $b ) X-Ref |
The callback to sort the entries by, used above in print_exported_file(). return: int param: Translations $a The first translation to compare. param: Translations $b The second translation to compare. since: 2.0.0 |
unescape( $string ) X-Ref |
Unescape a string to be used as a value in the properties file. return: string param: string $string The string to unescape. since: 2.0.0 |
escape( $string ) X-Ref |
Escape a string to be used as a value in the properties file. return: string param: string $string The string to escape. since: 2.0.0 |
escape_key( $string ) X-Ref |
Escape a string to be used as a key name in the properties file. return: string param: string $string The string to escape. since: 2.0.0 |
Generated: Sun Dec 22 01:01:04 2024 | Cross-referenced by PHPXref 0.7.1 |