factory a client object from a client database row
client
factoryFromDBRow
(array $cliRow, [boolean $debug = False])
-
array
$cliRow
-
boolean
$debug
factory a client object
CLIENT
factoryFromId
(
int $aId, [
boolean $debug =
False])
returns an unit of work client object
CLIENT
&getInstance
(
int $aId)
returns if a client with id $aId has already been instanced
boolean
isInstanced
(int $aId)
sets a client instance in the unit of work
void
setInstance
(
&$aClient, [
$debug =
False],
CLIENT $aClient)
-
CLIENT
$aClient
-
&$aClient
-
$debug
init the object and populate if an id is submitted
CLIENT
CLIENT
([int $aId = 0], [bool $debug = False], string $gDBIdx)
-
int
$aId: CLI_ID
-
string
$gDBIdx: database index in $GLOBALS
-
bool
$debug
activates the client (state=1 if < 1)
void
activate
()
adds an object to the frmPostSubOjects
void
addfrmPostSubObject
(string $table, &$obj, DBMS_TABLEOBJ $obj)
-
string
$table
-
DBMS_TABLEOBJ
$obj
-
&$obj
stores profile data to the database calls addProfileObj() for each value array
int
addProfile
(int $clpId, array $valArr, [boolean $multiArr = False], [boolean $dataCheck = TRUE], [boolean $debug = False])
-
int
$clpId
-
array
$valArr
-
boolean
$multiArr: if the profile allows multiple entries is $valArr a single entry or an array of entries?
-
boolean
$dataCheck: check the data by calling
-
boolean
$debug
stores profile data to the database processes only one data row
boolean
addProfileObj
( &$profile, array $valArr, [boolean $dataCheck = TRUE], [boolean $debug = False], CLP_PROFILE $profile)
-
CLP_PROFILE
$profile: the profile
-
array
$valArr: the posted array
-
boolean
$dataCheck: check the data by calling
-
boolean
$debug
-
&$profile
returns the CLI_ID if a client is found with same addresse and cols filled in
int
chkDuplicate
([boolean $debug = False])
deletes all profile entries for the user
boolean
clearProfileData
( &$profile, [boolean $useCurrentUser = TRUE], [boolean $debug = False], CLP_PROFILE $profile)
-
CLP_PROFILE
$profile
-
boolean
$useCurrentUser
-
boolean
$debug
-
&$profile
generates a user for the client and returns the user ID or False in case of error
int
createUser
(string $login, string $pwd, [boolean $enabled = TRUE], [array $groups = NULL], [boolean $debug = False], [int $defaultGrp = 0])
-
string
$login
-
string
$pwd: the clear text version
-
boolean
$enabled
-
array
$groups
-
boolean
$debug
-
int
$defaultGrp
creates a user from post values
boolean
createUserFromPost
(
&$frmObj,
&$usrId, [
boolean $debug =
False],
DBMS_FORM $frmObj,
int $usrId)
-
DBMS_FORM
$frmObj
-
int
$usrId: becomes the userId
-
boolean
$debug
-
&$frmObj
-
&$usrId
deletes the row from the database
boolean
dbDelete
([boolean $backupData = TRUE], [ $debug = False], string $gDBIDX)
-
string
$gDBIDX
-
boolean
$backupData
-
$debug
Redefinition of:
- DBMS_TABLEOBJ::dbDelete()
returns the admin form
DBMS_FORM
&dbGetAdminForm
(
boolean $frmMode, [
boolean $debug =
False])
-
boolean
$frmMode
-
boolean
$debug
returns the the data array of a join
array
dbGetDataArray
(array $tables, [array $filter = NULL], [boolean $withObjVars = TRUE], [boolean $debug = False])
-
array
$tables
-
array
$filter
-
boolean
$withObjVars
-
boolean
$debug
Redefinition of:
- DBMS_TABLEOBJ::dbGetDataArray()
- returns the the data array of a joins to the current row
returns a database form
DBMS_FORM
&dbGetForm
(
int $mode, [
string $frmName =
""], [
boolean $debug =
False], [
$autoNew =
False],
boolean $autonew)
-
int
$mode: dbms form show mode
-
string
$frmName: dbms form name
-
boolean
$debug: since pk-05-01-11
-
boolean
$autonew: generate a default form if no form is found
-
$autoNew
Redefinition of:
- DBMS_TABLEOBJ::dbGetForm()
- returns a database form
returns the admin form
DBMS_FORM
&dbGetUserForm
(
boolean $frmMode, [
boolean $debug =
False])
-
boolean
$frmMode
-
boolean
$debug
inserts a new row to the table
int
dbInsert
([boolean $debug = false])
-
boolean
$debug: (show debug info)
Redefinition of:
- DBMS_TABLEOBJ::dbInsert()
- inserts a new row to the table
replaces a row in the table
if the object has not been populated (!$this->populateTS) False is returned
boolean
dbReplace
([boolean $debug = False], [ $ignorPopulated = False], string $gDBIDX)
-
string
$gDBIDX: Index of $GLOBALS to the db object
-
boolean
$debug: show debug info
-
$ignorPopulated
Redefinition of:
- DBMS_TABLEOBJ::dbReplace()
- replaces a row in the table
deletes all client data
void
deleteAllData
([boolean $debug = False])
returns a dbrow with the primary address
array
getAddressDBRow
([boolean $withoutNull = TRUE], [boolean $debug = False])
-
boolean
$withoutNull: null values are not added to the array
-
boolean
$debug
returns a address of the client
ADDRESS
&getAddressObj
([
int $addrId =
0], [
boolean $debug =
False])
-
int
$addrId: if 0 the default address is used
-
boolean
$debug
returns an array with all address objects
array
getAddrList
([string $orderBy = ""], [boolean $debug = False])
-
string
$orderBy
-
boolean
$debug
returns an array with dbvalues for the client and the primary address
array
getCliAddrDBVal
([boolean $debug = False])
ADDRESS
&getDefaultAddress
([
boolen $debug =
False])
replaces dbGetForm and returns a OCSP_FORM
OCSP_FORM
&getForm
([
int $mode =
FRM_MODE_READONLY], [
mixed $form =
''], [
$frmClass =
'CLI_FORM'], [
boolean $debug =
False])
-
int
$mode
-
mixed
$form: (string) form name (int) form id
-
boolean
$debug
-
$frmClass
Redefinition of:
- DBMS_TABLEOBJ::getForm()
- replaces dbGetForm and returns a OCSP_FORM
returns the client Id
int
getId
()
returns the client name (CLI_NAME1 + CLI_NAME2)
string
getName
()
returns the client number or the ID if no number isset
string
getNumber
()
returns the default address
ADDRESS
&getPriAddr
([
bool $debug =
False])
returns the default Address ID if column CLI_DEFAULTADDR is 0 the first ADR_ID in T_ADDRESS of the client is set as primary
int
getPriAddrId
([boolean $autosave = TRUE], [boolean $debug = False])
-
boolean
$autosave: (save changes to the database)
-
boolean
$debug
returns an array with the profileData of the client retValue is array['ROW_NR'][COL]
array
getProfileData
(
&$profile, [
boolean $useCurrentUser =
TRUE], [
boolean $debug =
False],
CLI_PROFILE $profile)
-
CLI_PROFILE
$profile
-
boolean
$useCurrentUser
-
boolean
$debug
-
&$profile
returns an profile entry object
CLI_PROFILE_ENTRY
getProfileEntry
(
int $clpId, [
int $clpIdx =
0], [
boolean $debug =
False])
-
int
$clpId
-
int
$clpIdx
-
boolean
$debug
returns a DB-RowArray of profile
array
getProfileEntryRow
(
&$profile, [
int $clpidx =
0], [
boolean $useCurrentUser =
TRUE], [
boolean $debug =
False],
CLI_PROFILE $profile)
-
CLI_PROFILE
$profile
-
int
$clpidx
-
boolean
$useCurrentUser
-
boolean
$debug
-
&$profile
returns the key value to use in the profile
int
getProfileKey
(
&$profile, [
boolean $useCurrentUser =
TRUE], [
boolean $debug =
False],
CLI_PROFILE $profile)
-
CLI_PROFILE
$profile
-
boolean
$useCurrentUser
-
boolean
$debug
-
&$profile
CLI_PROFILE
getProfileObj
(
int $clpId, [
boolean $debug =
False])
-
int
$clpId
-
boolean
$debug
returns an array of staff objects
array
getSaffList
([int $csttypeId = 0], [string $orderBy = ""], [boolean $debug = False])
-
int
$csttypeId
-
string
$orderBy
-
boolean
$debug
returns a staff object
CLI_STAFF
getStaff
([
int $cstId =
0], [
boolean $useCliData =
False], [
boolean $debug =
False])
-
int
$cstId: the id
-
boolean
$useCliData: if TRUE the data from the client fits into staff are copied
-
boolean
$debug
returns an array with staffId's
array
getStaffIdArr
([int $ctyId = 0], [int $clsId = 0], [boolean $debug = False])
-
int
$ctyId
-
int
$clsId
-
boolean
$debug
returns the state id
int
getStateId
()
gets the clients type object
marks a client as deleted
boolean
markDeleted
()
replaces all profile data
int
replaceProfileData
( &$profile, array $pfDataArr, [boolean $useCurrentUser = TRUE], [boolean $debug = False], CLP_PROFILE $profile)
-
CLP_PROFILE
$profile
-
array
$pfDataArr
-
boolean
$useCurrentUser
-
boolean
$debug
-
&$profile
saves a linked row due to $cmd
boolean
saveLinkedRow
(string $table, array $row, string $cmd, [boolean $debug = false])
-
string
$table
-
array
$row
-
string
$cmd: (_OCSP_DBCMD_*)
-
boolean
$debug
Redefinition of:
- DBMS_TABLEOBJ::saveLinkedRow()
- saves a linked row due to $cmd
sets post array with form checks
bool
setFORMPOST
(
&$frmObj,
$dbval, [
bool $debug =
False], [
bool $asPopulate =
TRUE],
DBMS_FORM $frmObj,
array $dbVal)
-
DBMS_FORM
$frmObj: a formObj as ref
-
array
$dbVal: array with data
-
bool
$debug
-
bool
$asPopulate
-
&$frmObj
-
$dbval
sets the default Address by object
boolean
setPriAddr
(
ADDRESS $addrObj, [
boolean $saveAddr =
TRUE], [
boolean $debug =
False], [
boolean $autosave =
False])
-
ADDRESS
$addrObj
-
boolean
$saveAddr: execute $addrObj->dbSave() after updateing the object
-
boolean
$debug
-
boolean
$autosave: if true $this->dbSave() is called
sets the default Address ID
void
setPriAddrId
(int $aId)
sets the client state
void
setState
(int $clsId, [boolean $debug = False])
-
int
$clsId
-
boolean
$debug
void
setTypeId
($aTypeId $aTypeId)
sets the clients type object
void
setTypeObj
(
&$aType,
CLI_TYPE $aType)
sets the user id and updates the Client user Table
void
setUSR_ID
(int $aId, [boolean $debug = False])
returns if the current user is allowed for mode
boolean
userCan
([int $frmMode = 0], [boolean $debug = False])
-
int
$frmMode
-
boolean
$debug
returns if the current user can edit the client data
boolean
userCanDelete
([boolean $debug = False])
returns if the current user can edit the client data
void
userCanEdit
([boolean $debug = False])
void
userCanShow
([ $debug = False])
returns if the current user is an admin for the client first checks common and type rights and then T_CLI_USER.CLU_ISADMIN
boolean
userIsAdmin
([boolean $debug = False])
adds TableObject Contents to domRoot
bool
&xmladdDOMElement
(mixed &$domObj, &$domRoot, [bool $base64 = TRUE], [bool $debug = False], string $domRoot)
-
mixed
&$domObj: //reference to Parent DomObject
-
string
$domRoot: //reference to Parent DomRoot
-
bool
$base64
-
bool
$debug
-
&$domRoot
Redefinition of:
- DBMS_TABLEOBJ::xmladdDOMElement()
- adds TableObject Contents to domRoot
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()