Source for file exampleentries.php
Documentation is available at exampleentries.php
* Provide example entries for existing values next to the choices in a list, e.g. radio list
* @author Stuart Prescott
* @copyright Copyright Stuart Prescott
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
* @subpackage FormsLibrary
/** Load ancillary functions */
require_once 'inc/typeinfo.php';
/** uses choice list object for examples */
require_once 'dbchoicelist.php';
/** sql manipulation routines */
* Provide example entries for existing values next to the choices in a list, e.g. radio list
* @subpackage FormsLibrary
/** @var string field in the supplied data array supplied to format that should be used for looking up examples */
/** @var string table from which to take examples (SQL FROM $table) */
/** @var string column in the table that has to match the supplied data (SQL: WHERE $columnmatch=$data[$source]) */
/** @var string column in the table to return for matched data (SQL: SELECT $columnreturn) */
/** @var integer number of entries to return in the list (SQL: LIMIT) */
/** @var string order for in which entries should be returned (SQL: ORDER BY $order) */
/** @var string delimeter between example entries returned */
/** @var DBChoiceList object that obtains the data from the db */
* Create a new ExampleEntries object
* @param string $source see $this->source
* @param string $table see $this->table
* @param string $columnmatch see $this->columnmatch
* @param string $columnreturn see $this->columnreturn
* @param string $maxentries (optional, default 3 entries) see $this->limit
* @param string $order (optional, use $columnreturn by default) see $this->order
$maxentries=
3, $order=
'') {
$this->limit =
$maxentries;
$this->order =
($order !=
'' ?
$order :
$columnreturn);
* Obtain the example entries from the db
* @param string $id the id number (or string) to match
* Obtain the example entries and format them as appropriate
* @param array $data $data[$this->source] contains the id for which we should find examples
* (passed by ref for efficiency only)
* @return string list of examples
function format(&$data) {
} // class ExampleEntries
Documentation generated on Tue, 06 Mar 2007 10:01:24 +0000 by phpDocumentor 1.3.0