SimpleFormatReader Class Reference

Example implementation of old-style file format reader. More...

Inheritance diagram for SimpleFormatReader:
Inheritance graph
[legend]

List of all members.

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'

Detailed Description

Example implementation of old-style file format reader.

See also:
FFS

Definition at line 15 of file Simple.php.


Constructor & Destructor Documentation

SimpleFormatReader::__construct ( filename  ) 

Definition at line 23 of file Simple.php.


Member Function Documentation

SimpleFormatReader::parseAuthors (  ) 
Returns:
array

Reimplemented in WikiFormatReader.

Definition at line 36 of file Simple.php.

Here is the call graph for this function:

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.

Parameters:
$mangler StringMangler
Returns:
array

Reimplemented in WikiFormatReader.

Definition at line 106 of file Simple.php.

SimpleFormatReader::parseStaticHeader (  ) 

Parses the static header, if needed, and returns it.

Returns:
string

Reimplemented in WikiFormatReader.

Definition at line 49 of file Simple.php.

Here is the call graph for this function:


Member Data Documentation

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().

Definition at line 17 of file Simple.php.

Definition at line 16 of file Simple.php.


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