Class DBList

Description

generic database list/export class

  • todo: //TODO: codedoc

Located in /inc/formslib/dblist.php (line 29)


	
			
Variable Summary
mixed $breakfield
mixed $data
mixed $distinct
mixed $fatal_sql
mixed $fieldOrder
mixed $formatdata
mixed $formatter
mixed $group
mixed $join
mixed $omitFields
mixed $order
mixed $restriction
mixed $table
mixed $union
Method Summary
DBList DBList (string $table, mixed $returnFields, mixed $restriction, [boolean $distinct = false])
void fill ()
string format (array $data)
void formatList ()
string outputHeader ()
void setFormat ( $f,  $v, string $f1, array $v1)
string _getSQLsyntax ()
array _makeArray ( &$d)
Variables
mixed $breakfield (line 46)
mixed $data (line 43)
mixed $distinct = 0 (line 41)
mixed $fatal_sql = 1 (line 47)
mixed $fieldOrder (line 39)
mixed $formatdata (line 44)
mixed $formatter (line 40)
mixed $group (line 34)
mixed $join = array() (line 32)
mixed $numReturnFields (line 37)
mixed $omitFields = array() (line 38)
mixed $order (line 33)
mixed $outputFormat = EXPORT_FORMAT_CUSTOM (line 45)
mixed $restriction (line 30)
mixed $returnFields (line 36)
mixed $table (line 42)
mixed $union (line 35)
mixed $unionrestriction = array() (line 31)
Methods
Constructor DBList (line 57)

Create a new DBList object

DBList DBList (string $table, mixed $returnFields, mixed $restriction, [boolean $distinct = false])
  • string $table: name of (primary) table to be interrogated
  • mixed $returnFields: single column name or list of column names to be returned from the db
  • mixed $restriction: single or list of restrictions to be 'AND'ed together
  • boolean $distinct: select only DISTINCT rows from the db
fill (line 86)

Fill the object from the database

void fill ()
format (line 180)

format a row of data

  • return: formatter line of data
string format (array $data)
  • array $data: name=>value pairs of data
formatList (line 160)

format the list using the designated formats into another list

void formatList ()
outputHeader (line 205)

format a header row

  • return: formatter header row
string outputHeader ()
setFormat (line 239)

Create a set of OutputFormatter objects to handle the display of this object.

void setFormat ( $f,  $v, string $f1, array $v1)
  • string $f1: sprintf format (see PHP manual)
  • array $v1: array of indices that will be used to fill the fields in the sprintf format from a $data array passed to the formatter later.
  • $f
  • $v
_getSQLsyntax (line 138)

generate the appropriate SQL syntax for this query

  • return: SQL query for this object
string _getSQLsyntax ()
_makeArray (line 217)

create a row of data with the value and some formatting data for use by the Array/HTML/PDF Export

  • return: list of array(value=>$value, format=>$format, width=>$width)
array _makeArray ( &$d)
  • &$d

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