Class DBO

Description

database object base class (self-initialising and self-updating object)

Located in /inc/formslib/dbobject.php (line 30)


	
			
Direct descendents
Class Description
DBChoiceList A choice list based on an SQL statement.
DBRow Object representing a database row (and extensible to represent joined rows)
Variable Summary
boolean $changed
integer $DEBUG
boolean $deletable
string $dumpheader
boolean $editable
string $errorMessage
boolean $fatal_sql
array $fields
string $id
string $idfield
string $idfieldreal
boolean $ignoreId
boolean $isValid
string $namebase
integer $oob_status
string $table
Method Summary
DBO DBO (string $table, string $id, [mixed $idfield = 'id'])
string display ()
void log (string $logstring, [integer $priority = 10])
void setEditable ([boolean $editable = 1])
void setNamebase ([string $newname = ''])
string text_dump ()
void __clone ()
Variables
boolean $changed = 0 (line 48)
  • var: the fields in this row have changed cf the database

Redefined in descendants as:
integer $DEBUG = 0 (line 67)
  • var: debug level 0=off
boolean $deletable = 1 (line 46)
  • var: this field is able to be deleted (or marked as deleted)
string $dumpheader = 'DBO object' (line 54)
  • var: output when doing text dumps of the object
boolean $editable = 0 (line 44)
  • var: this field is able to be edited by the user

Redefined in descendants as:
string $errorMessage = '' (line 60)
  • var: current error message
boolean $fatal_sql = 1 (line 56)
  • var: sql errors should be considered fatal and the script will die()
array $fields (line 42)
  • var: list of Field objects in this row
string $id = -1 (line 38)
  • var: the id/key value for this particlar row. -1 means not assigned yet (new object not in table)
string $idfield (line 34)
  • var: db column that is the id/key
string $idfieldreal (line 36)
  • var: ??? FIXME: unused?
boolean $ignoreId = false (line 40)
  • var: if true, *don't* use the ID field in updates etc
boolean $isValid = 0 (line 50)
  • var: the data in the fields are valid
string $namebase (line 58)
  • var: prefixed to all name="$field[name]" sections of the html code
string $oob_errorMessage = '' (line 64)
integer $oob_status = STATUS_NOOP (line 62)
  • var: status code from operation from statuscodes.php
boolean $suppressValidation = 0 (line 52)
  • var: don't do validation on the data
string $table (line 32)
  • var: db table from which to take data
Methods
Constructor DBO (line 76)

Create a new database object, designed to be superclasses

DBO DBO (string $table, string $id, [mixed $idfield = 'id'])
  • string $table: see $this->table
  • string $id: see $this->id
  • mixed $idfield: if string, $this->idfield. if array, ($this->idfield, $this->idfieldreal).
log (line 142)

Debug print function.

void log (string $logstring, [integer $priority = 10])
  • string $logstring: debug message to be output
  • integer $priority: priority of the message, will not be written unless $priority <= $this->DEBUG
setEditable (line 106)

Sets whether a row and all fields within it are editable

void setEditable ([boolean $editable = 1])
  • boolean $editable: new editable state
setNamebase (line 94)

Sets a new name base for row and all fields within it

The name base is prepended to the field name in all html name="" sequences for the widgets

void setNamebase ([string $newname = ''])
  • string $newname: new name-base to use
text_dump (line 118)

Create a quick text representation of the object

  • return: text representation
string text_dump ()

Redefined in descendants as:
__clone (line 153)

PHP5 clone method

PHP5 clone statement will perform only a shallow copy of the object. Any subobjects must also be cloned

void __clone ()

Redefined in descendants as:

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