Class ADDRESS

Description

Base class DBMS_TABLEOBJ to handel table data in an object

  • author: Peter Krebs (pk) <pitlinz@users.sourceforge.net>
  • version: pk-04-01-02
  • version: pk-05-11-17
  • version: pk-08-01-31
  • version: $Id: DBMS_TABLEOBJ.phpclass,v 1.60 2008/12/17 16:28:52 peterkrebs Exp $

Located in /client/ADDRESS.phpclass (line 39)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --ADDRESS
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
 static $addrObjLst $addrObjLst
 mixed $myTable
Method Summary
 static ADDRESS &factoryFromId (int $aId, [boolean $debug = false])
 static boolean factoryFromRow (array $row, [boolean $debug = false])
 static ADDRESS &getInstance (int $aId)
 ADDRESS ADDRESS ([int $cliId = 0], [int $adrId = 0], [bool $debug = FALSE], string $gDBIdx)
 void dbInsert ([ $debug = FALSE])
 boolean dbPopulate ([boolean $debug = false])
 mixed dbSave ([bool $debug = False])
 CLIENT &getClient ([bool $debug = False])
 int getCliId ()
 int getId ()
 boolean isPrimary ()
 boolean setClient ( &$cliObj, [boolean $debug = FALSE], CLIENT $cliObj)
 boolean setCliId (int $aId)
 void setDBField (string $col, mixed $val)
 void setId (int $aId)
 void setPrimary ([bool $saveClient = FALSE], [ $debug = FALSE])
Variables
static $addrObjLst $addrObjLst = array() (line 60)

unit of work address objects

  • var: array
  • access: protected
mixed $myClassSrcFile = __FILE__ (line 90)
  • staticvar: string $myClassSrcFile: if is set the DBMS_FORM get the class object
  • since: pk-06-10-02
CLIENT $myClient = NULL (line 95)
  • var: myClient
mixed $myTable = "T_ADDRESS" (line 84)
  • staticvar: string $myTable: name of the db table

Redefinition of:
DBMS_TABLEOBJ::$myTable
NOT FINAL !!!!!

Inherited Variables

Inherited from DBMS_TABLEOBJ

DBMS_TABLEOBJ::$autoIncFld
DBMS_TABLEOBJ::$dbTableDefinitions
DBMS_TABLEOBJ::$frmPostSubOjects
DBMS_TABLEOBJ::$hasObjVals
DBMS_TABLEOBJ::$initTS
DBMS_TABLEOBJ::$myCacheTS
DBMS_TABLEOBJ::$myFields
DBMS_TABLEOBJ::$myKeys
DBMS_TABLEOBJ::$myLinkedTableRows
DBMS_TABLEOBJ::$myMode
DBMS_TABLEOBJ::$myObjVals
DBMS_TABLEOBJ::$myObjValsPopulateTS
DBMS_TABLEOBJ::$objError
DBMS_TABLEOBJ::$objErrorMsg
DBMS_TABLEOBJ::$populateTS
DBMS_TABLEOBJ::$staticClassVars
DBMS_TABLEOBJ::$valChangeTS

Inherited from OCSP_OBJ

OCSP_OBJ::$global_currentUser
OCSP_OBJ::$global_defaultDBObj_read
OCSP_OBJ::$global_defaultDBObj_write
OCSP_OBJ::$myDBObj
Methods
static factoryFromId (line 159)

factory an address from the id

  • todo: change calls to getInstance()
  • since: pk-08-03-07
  • access: public
ADDRESS &factoryFromId (int $aId, [boolean $debug = false])
  • int $aId
  • boolean $debug
static factoryFromRow (line 134)

factory an address and sets dbRow

  • version: pk-08-07-31
  • since: pk-08-03-07
  • access: public
boolean factoryFromRow (array $row, [boolean $debug = false])
  • array $row
  • boolean $debug
static getInstance (line 71)

returns an instance of the unit of work

  • access: public
ADDRESS &getInstance (int $aId)
  • int $aId
Constructor ADDRESS (line 106)

init the object and populate if an id is submitted

ADDRESS ADDRESS ([int $cliId = 0], [int $adrId = 0], [bool $debug = FALSE], string $gDBIdx)
  • int $cliId: CLI_ID
  • int $adrId
  • string $gDBIdx
  • bool $debug
dbInsert (line 434)
void dbInsert ([ $debug = FALSE])
  • $debug

Redefinition of:
DBMS_TABLEOBJ::dbInsert()
inserts a new row to the table
dbPopulate (line 349)

populates the address object and adds to self::$addrObjLst

  • since: pk-08-03-07
boolean dbPopulate ([boolean $debug = false])
  • boolean $debug

Redefinition of:
DBMS_TABLEOBJ::dbPopulate()
populates the object values form the database
dbSave (line 379)

save the Object

if ADR_ISPRIMARY is set:

  • update client
  • make sure no other address is primary for the client

  • version: pk-08-02-11
  • deprecated: since pk-08-05-16
mixed dbSave ([bool $debug = False])
  • bool $debug: SHOW DEBUG INFO

Redefinition of:
DBMS_TABLEOBJ::dbSave()
save the Object if $this->autoIncFld is not empty
getClient (line 304)

returns the client object

if $this->myClient is not an object a new one is created

  • version: pk-07-10-10
  • version: pk-08-02-11
  • version: pk-08-11-29
CLIENT &getClient ([bool $debug = False])
  • bool $debug
getCliId (line 232)

returns the Client ID

int getCliId ()
getId (line 209)

returns the id

int getId ()
isPrimary (line 270)

returns if the address is the primary address

  • since: pk-08-05-16
  • access: public
boolean isPrimary ()
setClient (line 328)

sets the client object

  • version: pk-08-02-11
  • since: pk-05-11-01
boolean setClient ( &$cliObj, [boolean $debug = FALSE], CLIENT $cliObj)
  • CLIENT $cliObj
  • boolean $debug
  • &$cliObj
setCliId (line 248)

sets the client ID

if the new value differs from $this->myClient->getId() $this->myClient is set to NULL

  • version: pk-08-02-11
boolean setCliId (int $aId)
  • int $aId
setDBField (line 194)

sets column value

replaces CLI_NAME1 -> ADR_CO CLI_NAME2 -> ADR_CO2

  • since: pk-05-03-03
void setDBField (string $col, mixed $val)
  • string $col
  • mixed $val

Redefinition of:
DBMS_TABLEOBJ::setDBField()
sets the value of a object var (DB COLUMN)
setId (line 221)

sets the id

  • version: pk-08-03-07
void setId (int $aId)
  • int $aId
setPrimary (line 281)

sets this to the clients primary address

void setPrimary ([bool $saveClient = FALSE], [ $debug = FALSE])
  • bool $saveClient
  • $debug

Inherited Methods

Inherited From DBMS_TABLEOBJ

 DBMS_TABLEOBJ::DBMS_TABLEOBJ()
 DBMS_TABLEOBJ::cacheRestore()
 DBMS_TABLEOBJ::cacheWriteTo()
 DBMS_TABLEOBJ::clearErrors()
 DBMS_TABLEOBJ::dbDelete()
 DBMS_TABLEOBJ::dbGetDataArray()
 DBMS_TABLEOBJ::dbGetForm()
 DBMS_TABLEOBJ::dbInsert()
 DBMS_TABLEOBJ::dbPopulate()
 DBMS_TABLEOBJ::dbReplace()
 DBMS_TABLEOBJ::dbSave()
 DBMS_TABLEOBJ::db_SetKey()
 DBMS_TABLEOBJ::db_SetKeyArray()
 DBMS_TABLEOBJ::getClassInclude()
 DBMS_TABLEOBJ::getDbDesc()
 DBMS_TABLEOBJ::getDBField()
 DBMS_TABLEOBJ::getDBRow()
 DBMS_TABLEOBJ::getDBVal()
 DBMS_TABLEOBJ::getDefaults()
 DBMS_TABLEOBJ::getErrorMsg()
 DBMS_TABLEOBJ::getFieldDBDefault()
 DBMS_TABLEOBJ::getForm()
 DBMS_TABLEOBJ::getFormClassName()
 DBMS_TABLEOBJ::getFormName()
 DBMS_TABLEOBJ::getJSON()
 DBMS_TABLEOBJ::getKeyArr()
 DBMS_TABLEOBJ::getMyTable()
 DBMS_TABLEOBJ::getObjValArray()
 DBMS_TABLEOBJ::getObjValValue()
 DBMS_TABLEOBJ::getPopulateTs()
 DBMS_TABLEOBJ::getWhere()
 DBMS_TABLEOBJ::hasChanged()
 DBMS_TABLEOBJ::hasColumn()
 DBMS_TABLEOBJ::hasErrors()
 DBMS_TABLEOBJ::hasObjVals()
 DBMS_TABLEOBJ::init()
 DBMS_TABLEOBJ::isInit()
 DBMS_TABLEOBJ::isPopulated()
 DBMS_TABLEOBJ::keysAreSet()
 DBMS_TABLEOBJ::populateFromKeys()
 DBMS_TABLEOBJ::populateFromValues()
 DBMS_TABLEOBJ::populateObjVals()
 DBMS_TABLEOBJ::p_cacheIsExpired()
 DBMS_TABLEOBJ::saveLinkedRow()
 DBMS_TABLEOBJ::saveLinkedTableRows()
 DBMS_TABLEOBJ::saveObjVals()
 DBMS_TABLEOBJ::setChanged()
 DBMS_TABLEOBJ::setDBField()
 DBMS_TABLEOBJ::setDBFieldIfDiff()
 DBMS_TABLEOBJ::setDBFieldIfEmpty()
 DBMS_TABLEOBJ::setDBRow()
 DBMS_TABLEOBJ::setDBVal()
 DBMS_TABLEOBJ::setDefaults()
 DBMS_TABLEOBJ::setError()
 DBMS_TABLEOBJ::setLinkedTableRow()
 DBMS_TABLEOBJ::setMyTable()
 DBMS_TABLEOBJ::setObjValArray()
 DBMS_TABLEOBJ::setObjValValue()
 DBMS_TABLEOBJ::setObjVarIfEmpty()
 DBMS_TABLEOBJ::setUnChanged()
 DBMS_TABLEOBJ::userIsAllowed()
 DBMS_TABLEOBJ::writeDebugInfo()
 DBMS_TABLEOBJ::xmladdDOMElement()
 DBMS_TABLEOBJ::xmlExport()
 DBMS_TABLEOBJ::_getCacheFileName()
 DBMS_TABLEOBJ::_getDBFields()

Inherited From OCSP_OBJ

 OCSP_OBJ::castObj()
 OCSP_OBJ::cloneMe()
 OCSP_OBJ::currentUser()
 OCSP_OBJ::dbConnect()
 OCSP_OBJ::defaultDBObj()
 OCSP_OBJ::defaultReadDBObj()
 OCSP_OBJ::defaultWriteDBObj()
 OCSP_OBJ::getConf()
 OCSP_OBJ::getDBObj()
 OCSP_OBJ::get_myClassConstant()
 OCSP_OBJ::get_myObject_vars()
 OCSP_OBJ::get_mySourceFile()
 OCSP_OBJ::isConnected()
 OCSP_OBJ::isMultiByteStr()
 OCSP_OBJ::isUTF8()
 OCSP_OBJ::setConf()
 OCSP_OBJ::setDBObj()
 OCSP_OBJ::set_myObject_vars()
 OCSP_OBJ::set_myVarsFrom()
Class Constants
CLASS_SRC_FILE = __FILE__ (line 47)

Inherited Constants

Inherited from DBMS_TABLEOBJ

DBMS_TABLEOBJ::CLASS_SRC_FILE

Inherited from OCSP_OBJ

OCSP_OBJ::CLASS_SRC_FILE

Documentation generated on Thu, 08 Jan 2009 17:37:29 +0100 by phpDocumentor 1.4.0a2