Example implementation of old-style file format reader. More...
Public Member Functions | |
__construct ($filename) | |
parseAuthors () | |
parseStaticHeader () | |
Parses the static header, if needed, and returns it. | |
parseMessages (StringMangler $mangler) | |
Reads the file contents and returns an array of keys and messages. | |
Public Attributes | |
const | SEPARATOR = '----' |
const | AUTHORPREFIX = 'Author: ' |
Protected Member Functions | |
parseHeader () | |
Parses the header from the file and sets the $authors and $staticHeader members. | |
Protected Attributes | |
$filename = false | |
$prefixLength | |
$authors = null | |
$staticHeader = '' | |
$messagePattern = '/([^\0]+)\0([^\0]+)\0\n/U' |
Example implementation of old-style file format reader.
Definition at line 15 of file Simple.php.
SimpleFormatReader::__construct | ( | $ | filename | ) |
Definition at line 23 of file Simple.php.
SimpleFormatReader::parseAuthors | ( | ) |
Reimplemented in WikiFormatReader.
Definition at line 36 of file Simple.php.
SimpleFormatReader::parseHeader | ( | ) | [protected] |
Parses the header from the file and sets the $authors and $staticHeader members.
Definition at line 61 of file Simple.php.
Referenced by parseAuthors(), and parseStaticHeader().
SimpleFormatReader::parseMessages | ( | StringMangler $ | mangler | ) |
Reads the file contents and returns an array of keys and messages.
$mangler | StringMangler |
Reimplemented in WikiFormatReader.
Definition at line 106 of file Simple.php.
SimpleFormatReader::parseStaticHeader | ( | ) |
Parses the static header, if needed, and returns it.
Reimplemented in WikiFormatReader.
Definition at line 49 of file Simple.php.
SimpleFormatReader::$authors = null [protected] |
Definition at line 30 of file Simple.php.
Referenced by parseHeader().
SimpleFormatReader::$filename = false [protected] |
Definition at line 20 of file Simple.php.
Referenced by __construct().
SimpleFormatReader::$messagePattern = '/([^\0]+)\0([^\0]+)\0\n/U' [protected] |
Definition at line 98 of file Simple.php.
SimpleFormatReader::$prefixLength [protected] |
Definition at line 21 of file Simple.php.
SimpleFormatReader::$staticHeader = '' [protected] |
Definition at line 31 of file Simple.php.
Referenced by parseHeader().
const SimpleFormatReader::AUTHORPREFIX = 'Author: ' |
Definition at line 17 of file Simple.php.
const SimpleFormatReader::SEPARATOR = '----' |
Definition at line 16 of file Simple.php.