Class ChesterFormatter

Description

Produces a valid Chester import file.

Located in /include/classes/export-data/ChesterFormatter.inc (line 19)


	
			
Variable Summary
Method Summary
 ChesterFormatter ChesterFormatter (DB &$db, PhraseBook &$pb)
 string buildEventBlock (ChesterMapping &$mapper, int $eid, string $programNumber, string $category, string $level, string $style)
 string buildJudgeList ()
 string generate (ChesterMapping &$mapper)
 string _buildDanceList (QueryResult &$qr, int $numDances)
 string _buildEntryList (QueryResult &$qr, int $numEntries)
Variables
DB $_db (line 25)

A connection to a competition database

  • access: private
PhraseBook $_pb (line 31)

A phrase book containing SQL queries for use in Chester Exports

  • access: private
Methods
Constructor ChesterFormatter (line 37)

Constructor

ChesterFormatter ChesterFormatter (DB &$db, PhraseBook &$pb)
  • DB &$db: the database providing data
  • PhraseBook &$pb: the catalog of needed queries
buildEventBlock (line 128)

The export for a single event

  • return: details on a given event
  • access: public
string buildEventBlock (ChesterMapping &$mapper, int $eid, string $programNumber, string $category, string $level, string $style)
  • ChesterMapping &$mapper: maps CIB labels to Chester codes
  • int $eid: the events primary key
  • string $programNumber: the audience facing numeric identifier
  • string $category: the category of the event (often blank)
  • string $level: the CIB label for the event's level
  • string $style: the CIB label for the event's style
buildJudgeList (line 67)

Outputs the adjudicator chunk

  • return: the list of adjudicators, if any entered
  • access: public
string buildJudgeList ()
generate (line 48)

Creates the full export format

  • return: the full contenst of the export file
  • access: public
string generate (ChesterMapping &$mapper)
_buildDanceList (line 88)

The text names of dances involved in an event

  • return: a list newline seperated list of dances
  • access: private
  • internal: $numDances is passed in because it is also needed in the bulk output.
string _buildDanceList (QueryResult &$qr, int $numDances)
  • QueryResult &$qr: a query result
  • int $numDances: now many rows in this query result
_buildEntryList (line 106)

The list of couples numbers entered in an event

  • return: a list couple numbers
  • access: private
  • internal: $numEntries is passed in because it is also needed in the bulk output.
string _buildEntryList (QueryResult &$qr, int $numEntries)
  • QueryResult &$qr: a query result
  • int $numEntries: now many rows in this query result

Documentation generated on Tue, 25 Apr 2006 12:59:00 -0400 by phpDocumentor 1.3.0RC3