Abstract Class ListFormatter

Description

Formats QueryResults for use in outside documentation.

  • abstract:

Located in /include/classes/printed-formatting/ListFormatter.inc (line 18)


	
			
Direct descendents
Class Description
 class CompetitorAffilListFormatter Formats QueryResults for use in outside documentation.
 class CompetitorListFormatter Formats QueryResults for use in outside documentation.
 class EventEntryListFormatter Formats QueryResults for use in outside documentation.
 class EventListFormatter Formats QueryResults for use in outside documentation.
Variable Summary
 array $emptyString
 array $footer
 array $listTitle
 array $lookback
Method Summary
 ListFormatter ListFormatter (mixed $title, mixed $emptyString, [array $lookback = array()], [mixed $footer = ""])
 void formatAsTabbed (QueryResult $qr, [mixed $baseContext = array()])
 void formatAsText (QueryResult $qr, [mixed $baseContext = array()])
 string _format (QueryResult $qr, string $type, [array $baseContext = array()])
 string _printTabbed (array $arr, array $context)
 void _printText (mixed $arr, mixed $context)
 boolean _usesRowLookback (string $type)
 boolean _usesSectionLookback (string $type)
Variables
array $emptyString (line 33)

What to print when there are no rows

  • var: the empty labels for the different $types
  • access: private
array $footer (line 38)

What footer does the list need

  • access: private
array $listTitle (line 23)

The title for the list

  • var: the titles for the different $types
  • access: private
array $lookback (line 28)

Does this list need to track previous rows/sections

  • access: private
Methods
Constructor ListFormatter (line 52)

Constructor

Will typically be called by the concrete subclass to configure the outputter.

ListFormatter ListFormatter (mixed $title, mixed $emptyString, [array $lookback = array()], [mixed $footer = ""])
  • mixed $title: either string or array (indexed by types)
  • mixed $emptyString: either string or array indexed by types for use when there are no items in the query result
  • array $lookback: used to configure outputs that need to remember previously seen sections/rows.
  • mixed $footer: string or array indexed by types
formatAsTabbed (line 162)

Return the list as a tabbed text list

  • access: public
void formatAsTabbed (QueryResult $qr, [mixed $baseContext = array()])
  • QueryResult $qr: A QueryResult returned from a call to DB::query()
formatAsText (line 174)

Return the list as a pre-formatted text list

  • access: public
void formatAsText (QueryResult $qr, [mixed $baseContext = array()])
  • QueryResult $qr: A QueryResult returned from a call to DB::query()
_format (line 124)

Format the list, using callbacks to the concrete classes.

  • return: a formatted string
  • access: protected
  • todo: Look into splitting type out to a strategy?
string _format (QueryResult $qr, string $type, [array $baseContext = array()])
  • QueryResult $qr: A QueryResult returned from a call to DB::query()
  • string $type: Used to identify the desired format
  • array $baseContext: Contest information needed by the outputter
_printTabbed (line 103)

Outputs an array with a tab between each item and

a newline at the end

  • return: a single row for the output
  • access: protected
string _printTabbed (array $arr, array $context)
  • array $arr: list of elements to output, tab seperated
  • array $context: not used in this implementation

Redefined in descendants as:
_printText (line 183)

Abstract function, must be overrided for text output

  • abstract:
  • access: protected
void _printText (mixed $arr, mixed $context)

Redefined in descendants as:
_usesRowLookback (line 91)

Does this formatter need to track rows

  • return: whether we need to track rows or not
  • access: protected
boolean _usesRowLookback (string $type)
  • string $type: current type of output
_usesSectionLookback (line 81)

Does this formatter need to track sectionss

  • return: whether we need to track sections or not
  • access: protected
boolean _usesSectionLookback (string $type)
  • string $type: current type of output

Documentation generated on Tue, 25 Apr 2006 13:04:27 -0400 by phpDocumentor 1.3.0RC3