Class ExampleEntries

Description

Provide example entries for existing values next to the choices in a list, e.g. radio list

Located in /inc/formslib/exampleentries.php (line 28)


	
			
Variable Summary
string $columnmatch
string $columnreturn
integer $limit
string $order
string $separator
string $source
string $table
Method Summary
ExampleEntries ExampleEntries (string $source, string $table, string $columnmatch, string $columnreturn, [string $maxentries = 3], [string $order = ''])
void fill (string $id)
string format ( &$data, array $data)
Variables
string $columnmatch (line 34)
  • var: column in the table that has to match the supplied data (SQL: WHERE $columnmatch=$data[$source])
string $columnreturn (line 36)
  • var: column in the table to return for matched data (SQL: SELECT $columnreturn)
integer $limit (line 38)
  • var: number of entries to return in the list (SQL: LIMIT)
DBChoiceList $list (line 44)
  • var: object that obtains the data from the db
string $order (line 40)
  • var: order for in which entries should be returned (SQL: ORDER BY $order)
string $separator = ', ' (line 42)
  • var: delimeter between example entries returned
string $source (line 30)
  • var: field in the supplied data array supplied to format that should be used for looking up examples
string $table (line 32)
  • var: table from which to take examples (SQL FROM $table)
Methods
Constructor ExampleEntries (line 56)

Create a new ExampleEntries object

ExampleEntries ExampleEntries (string $source, string $table, string $columnmatch, string $columnreturn, [string $maxentries = 3], [string $order = ''])
  • string $source: see $this->source
  • string $table: see $this->table
  • string $columnmatch: see $this->columnmatch
  • string $columnreturn: see $this->columnreturn
  • string $maxentries: (optional, default 3 entries) see $this->limit
  • string $order: (optional, use $columnreturn by default) see $this->order
fill (line 71)

Obtain the example entries from the db

void fill (string $id)
  • string $id: the id number (or string) to match
format (line 87)

Obtain the example entries and format them as appropriate

  • return: list of examples
string format ( &$data, array $data)
  • array $data: $data[$this->source] contains the id for which we should find examples (passed by ref for efficiency only)
  • &$data

Documentation generated on Tue, 06 Mar 2007 10:01:24 +0000 by phpDocumentor 1.3.0