STransListXML Class Reference
[Translators]

translates list XML into html. More...

Inheritance diagram for STransListXML:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 __construct ($parent)
 Adds a couple variable initiations to the standard construct.
 doc ()
 returns a brief description of this class.
 translate ($si)
 Translates the list xml into html.

Protected Member Functions

 isEvenRow ()
 A simple helper function that tests if the current row is even or odd.
 isFirstInSection ()
 Another simple helper function that tests if the current section is the first one.
 translateListPage ($page)
 a helper function that translates a single item (page) of a list.
 translateListUnit ($curUnit)
 a helper function that translates a single category of a list.

Protected Attributes

 $catBuf
 $catCount
 $catCountBuf
 $catIdBuf
 $curPrefix
 $firstInSection
 $jsBuf
 $listItemCount
 $listNum
 $transHelperClass


Detailed Description

translates list XML into html.

Author:
Jonathan Stuart-Moore <jwsm@shodor.org>

Definition at line 8 of file STransListXML.php5.


Constructor & Destructor Documentation

STransListXML::__construct ( parent  ) 

Adds a couple variable initiations to the standard construct.

Parameters:
$parent [PageRender]: The current PageRender in use.

Reimplemented from STrans.

Definition at line 56 of file STransListXML.php5.

References STrans::$parent, and STrans::setOption().


Member Function Documentation

STransListXML::doc (  ) 

returns a brief description of this class.

Returns:
[string]: A brief description of this class.

Reimplemented from STransXML.

Definition at line 48 of file STransListXML.php5.

STransListXML::isEvenRow (  )  [protected]

A simple helper function that tests if the current row is even or odd.

For internal use only.

Definition at line 269 of file STransListXML.php5.

Referenced by translateListPage().

STransListXML::isFirstInSection (  )  [protected]

Another simple helper function that tests if the current section is the first one.

For internal use only.

Definition at line 274 of file STransListXML.php5.

Referenced by translateListPage().

STransListXML::translate ( si  ) 

Translates the list xml into html.

Parameters:
$si [SInput]: the current SInput object being translated.
Returns:
[boolean]: always returns true.

Reimplemented from STransXML.

Definition at line 74 of file STransListXML.php5.

References STrans::getOption(), SXMLHelper::parse(), STrans::sendToTarget(), SObject::setPrettyError(), and translateListUnit().

STransListXML::translateListPage ( page  )  [protected]

a helper function that translates a single item (page) of a list.

For internal use only.

Parameters:
$page [SimpleXMLObject]: the XML for the item to translate.
Returns:
[string]: the HTML for the item ready to be added to the page.

Definition at line 203 of file STransListXML.php5.

References STrans::getOption(), SPath::getRelPath(), isEvenRow(), isFirstInSection(), and SObject::setPrettyError().

Referenced by translateListUnit().

STransListXML::translateListUnit ( curUnit  )  [protected]

a helper function that translates a single category of a list.

For internal use only.

Parameters:
$curUnit [SimpleXMLObject]: the XML for the category to translate.
Returns:
[string]: the HTML for the category ready to be added to the page.

Definition at line 153 of file STransListXML.php5.

References SObject::setPrettyError(), and translateListPage().

Referenced by translate().


Member Data Documentation

STransListXML::$catBuf [protected]

For internal use only.

store the category listing

Definition at line 25 of file STransListXML.php5.

STransListXML::$catCount [protected]

For internal use only.

running count of categories

Definition at line 21 of file STransListXML.php5.

STransListXML::$catCountBuf [protected]

For internal use only.

store the category counts

Definition at line 31 of file STransListXML.php5.

STransListXML::$catIdBuf [protected]

For internal use only.

store the category ids

Definition at line 28 of file STransListXML.php5.

STransListXML::$curPrefix [protected]

For internal use only.

store the current table id prefix

Definition at line 37 of file STransListXML.php5.

STransListXML::$firstInSection [protected]

For internal use only.

running bool - true false (first list item in section?)

Definition at line 18 of file STransListXML.php5.

STransListXML::$jsBuf [protected]

For internal use only.

store javascript

Definition at line 34 of file STransListXML.php5.

STransListXML::$listItemCount [protected]

For internal use only.

running count of items in current list

Definition at line 15 of file STransListXML.php5.

STransListXML::$listNum [protected]

For internal use only.

static class var -- which list are we currently on (of all on this page)?

Definition at line 12 of file STransListXML.php5.

STransListXML::$transHelperClass [protected]

For internal use only.

The helper class for aid in translating

Reimplemented from STrans.

Definition at line 42 of file STransListXML.php5.


The documentation for this class was generated from the following file:

Generated on Wed Nov 24 02:06:43 2010 for Common by  doxygen 1.5.6