Class CLI_STAFF

Description

Implements interfaces:

Class file CLI_STAFF.phpclass

Located in /client/CLI_STAFF.phpclass (line 42)

OCSP_OBJ
   |
   --DBMS_TABLEOBJ
      |
      --CLI_STAFF
Class Constant Summary
 CLASS_SRC_FILE = __FILE__
Variable Summary
Method Summary
 static CLI_STAFF factoryFromId (int $cstId, [boolean $debug = False])
 static CLI_STAFF factoryFromRow (array $staffData, [boolean $debug = False])
 static CLI_STAFF factoryFromType (int $typeId, [mixed $client = null], [int $cstId = 0], [boolean $debug = False])
 static CLI_STAFF &getInstance (int $aId, [boolean $debug = False])
 static boolean isInstanced (int $aId)
 static void setInstance ( &$aStaff, [boolean $debug = False], CLI_STAFF $aStaff)
 CLI_STAFF &checkTypeClass ([boolean $debug = False])
 CLI_STAFF CLI_STAFF ([mixed $client = NULL], [int $cstId = 0], [bool $debug = False])
 int createUser (string $login, string $pwd, [boolean $enabled = True], [array $groups = NULL], [boolean $debug = False], [int $defaultGrp = 0])
 boolean createUserFromPost ( &$frmObj,  &$usrId, [boolean $debug = False], DBMS_FORM $frmObj, int $usrId)
 boolean dbDelete ([boolean $backupData = True], [ $debug = False])
 DBMS_FORM &dbGetCliUserForm (boolean $frmMode, [string $frmName = ""], [boolean $debug = False])
 array dbGetDataArray (array $tables, [array $filter = NULL], [boolean $withObjVars = True], [boolean $debug = False])
 void dbInsert ([ $debug = False])
 boolean dbReplace ([boolean $debug = False], [boolean $ignorPopulated = False])
 void dbSave ([ $debug = False])
 boolean deleteUser (int $aId, [boolean $debug = False])
 ADDRESS getAddress ([boolean $debug = false])
 CLI_FORM getAdminForm ([int $frmMode = FRM_MODE_READONLY], [mixed $formIdName = NULL], [param $debug = False])
 CLIENT &getClient ([bool $debug = False])
 int getClientType ([boolean $debug = False])
 int getCliId ()
 int getId ()
 string getName ()
 void getProfileById ( $aId, [ $debug = False])
 string getTypeClass ([boolean $debug = False])
 boolean getTypeName ()
 CLI_STAFF_TYPE &getTypeObj ([boolean $debug = False])
 void getUserId ([ $debug = false])
 int get_TypeId ([boolean $debug = False])
 void init ([boolean $debug = False], string $gDBIdx)
 boolean removeUSR_ID (int $aId, [boolean $debug = False])
 void setClient ( &$aClient, [boolean $debug = False], CIENT $aClient)
 void setClientValuesToStaff ([boolean $debug = False])
 boolean setCliId (int $aId, [boolean $debug = False])
 bool setFORMPOST ( &$frmObj,  $dbval, [boolean $debug = False], [boolean $asPopulate = True], [boolean $strict = False], DBMS_FORM $frmObj, array $dbVal)
 void setId (int $aId)
 void setTypeObj ( &$aTypeObj, CLI_STAFF_TYPE $aTypeObj)
 boolean setUSR_ID (int $aId, [boolean $debug = False])
 void set_TypeId (int $aType, [ $debug = False])
 void userCanDelete ([boolean $debug = False])
 void userCanEdit ([boolean $debug = False])
 void userCanShow ([boolean $debug = False])
Variables
static mixed $loadedStaff = array() (line 66)

identity map

  • staticvar: array $loadedStaff:
  • access: protected
string $myClassSrcFile = __FILE__ (line 133)
  • access: protected
CLIENT $myClient = Null (line 126)
  • var: myClient
  • access: protected
mixed $myTable = "T_CLI_STAFF" (line 138)
  • staticvar: string $myTable: name of the db table
  • access: protected

Redefinition of:
DBMS_TABLEOBJ::$myTable
NOT FINAL !!!!!
CLI_STAFF_TYPE $myTypeObj = NULL (line 149)
  • since: pk-06-10-02
  • access: protected
double $typeIsSet (line 143)
  • var: (time())
  • access: protected

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 237)

returns a client staff object

  • since: pk-08-04-04
  • access: public
CLI_STAFF factoryFromId (int $cstId, [boolean $debug = False])
  • int $cstId
  • boolean $debug
static factoryFromRow (line 217)

returns a client staff object

  • since: pk-08-02-03
  • access: public
CLI_STAFF factoryFromRow (array $staffData, [boolean $debug = False])
  • array $staffData
  • boolean $debug
static factoryFromType (line 201)

returns a client staff object

  • since: pk-08-02-03
  • access: public
CLI_STAFF factoryFromType (int $typeId, [mixed $client = null], [int $cstId = 0], [boolean $debug = False])
  • int $typeId
  • mixed $client: (CLIENT object or client id)
  • int $cstId
  • boolean $debug
static getInstance (line 80)

returns an instance out of the identity map

  • version: pk-08-10-06 bugfix $aId
  • access: public
CLI_STAFF &getInstance (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug
static isInstanced (line 112)

returns if a staff has been added to the identity map

  • access: public
boolean isInstanced (int $aId)
  • int $aId
static setInstance (line 96)

adds a staff to the identity map

  • access: public
void setInstance ( &$aStaff, [boolean $debug = False], CLI_STAFF $aStaff)
checkTypeClass (line 388)

checks if this is type of class CSTTYPE_CLASS and returns the object ($this if ok else a new object of the right type)

  • version: pk-06-10-02
  • since: pk-06-01-16
CLI_STAFF &checkTypeClass ([boolean $debug = False])
  • boolean $debug
Constructor CLI_STAFF (line 167)

init the object and populate if an id is submitted

  • version: pk-08-02-04
  • version: pk-05-11-23
  • deprecated: since pk-08-08-19
CLI_STAFF CLI_STAFF ([mixed $client = NULL], [int $cstId = 0], [bool $debug = False])
  • mixed $client: (CLIENT object or client id)
  • int $cstId
  • bool $debug
createUser (line 968)

generates a user for the client and returns the user ID or False in case of error

  • version: pk-06-09-18
  • since: pk-06-01-17
int createUser (string $login, string $pwd, [boolean $enabled = True], [array $groups = NULL], [boolean $debug = False], [int $defaultGrp = 0])
  • string $login
  • string $pwd
  • boolean $enabled
  • array $groups
  • boolean $debug
  • int $defaultGrp
createUserFromPost (line 1049)

creates a user from post values

  • version: pk-06-10-04
  • since: pk-06-09-18
boolean createUserFromPost ( &$frmObj,  &$usrId, [boolean $debug = False], DBMS_FORM $frmObj, int $usrId)
  • DBMS_FORM $frmObj
  • int $usrId: becomes the userId
  • boolean $debug
  • &$frmObj
  • &$usrId
dbDelete (line 588)

deletes the row from the database

  • todo: backupData
  • since: pk-05-12-06
boolean dbDelete ([boolean $backupData = True], [ $debug = False])
  • boolean $backupData
  • $debug

Redefinition of:
DBMS_TABLEOBJ::dbDelete()
dbGetCliUserForm (line 682)

returns the user form

  • since: pk-06-10-16
DBMS_FORM &dbGetCliUserForm (boolean $frmMode, [string $frmName = ""], [boolean $debug = False])
  • boolean $frmMode
  • string $frmName: default form if no type form is found
  • boolean $debug
dbGetDataArray (line 431)

returns the the data array of a join

  • version: pk-07-10-10
  • todo: CLI_STAFF::dbGetDataArray() filter
  • since: pk-05-10-25
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
dbInsert (line 548)
void dbInsert ([ $debug = False])
  • $debug

Redefinition of:
DBMS_TABLEOBJ::dbInsert()
inserts a new row to the table
dbReplace (line 567)

updates change fields an call parent::dbReplace

boolean dbReplace ([boolean $debug = False], [boolean $ignorPopulated = False])
  • boolean $debug
  • boolean $ignorPopulated

Redefinition of:
DBMS_TABLEOBJ::dbReplace()
replaces a row in the table
dbSave (line 513)
void dbSave ([ $debug = False])
  • $debug

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

deletes a user

  • since: pk-06-10-05
boolean deleteUser (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug
getAddress (line 868)

returns the address object for the staff

if the staff has no address assigned the default address of the client is returned

  • since: pk-08-04-04
ADDRESS getAddress ([boolean $debug = false])
  • boolean $debug
getAdminForm (line 644)

returns the admin form

  • requires: CLI_FORM.phpclass
CLI_FORM getAdminForm ([int $frmMode = FRM_MODE_READONLY], [mixed $formIdName = NULL], [param $debug = False])
  • int $frmMode
  • mixed $formIdName
  • param $debug: boolean $debug
getClient (line 802)

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

CLIENT &getClient ([bool $debug = False])
  • bool $debug
getClientType (line 844)

returns the type id of the client

  • since: pk-05-11-22
int getClientType ([boolean $debug = False])
  • boolean $debug
getCliId (line 760)

returns the Client ID

int getCliId ()
getId (line 271)

returns the id

int getId ()
getName (line 287)

returns the name of the staff

string getName ()
getProfileById (line 1132)
void getProfileById ( $aId, [ $debug = False])
  • $aId
  • $debug
getTypeClass (line 369)

returns the class specified by the staff type

  • version: pk-06-01-16
  • version: pk-06-10-02
  • since: pk-05-11-22
string getTypeClass ([boolean $debug = False])
  • boolean $debug
getTypeName (line 407)

returns the name of the type (not the class !!!)

  • since: pk-06-10-04
boolean getTypeName ()
getTypeObj (line 332)

checks if $this->myTypeObj is set proper and return it

  • version: pk-08-07-30
  • since: pk-06-10-02
CLI_STAFF_TYPE &getTypeObj ([boolean $debug = False])
  • boolean $debug
getUserId (line 893)
  • access: public
void getUserId ([ $debug = false])
  • $debug
get_TypeId (line 307)

returns the client type id

  • version: pk-06-10-02
  • since: pk-06-01-16
int get_TypeId ([boolean $debug = False])
  • boolean $debug
init (line 259)

set client table to config setting if set

  • since: pk-05-03-15
void init ([boolean $debug = False], string $gDBIdx)
  • string $gDBIdx
  • boolean $debug

Redefinition of:
DBMS_TABLEOBJ::init()
initalize the object
removeUSR_ID (line 943)

removes a user from the staff

  • since: pk-06-09-15
boolean removeUSR_ID (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug
setClient (line 820)

sets the client object

  • version: pk-08-02-20
  • since: pk-06-10-04
void setClient ( &$aClient, [boolean $debug = False], CIENT $aClient)
  • CIENT $aClient
  • boolean $debug
  • &$aClient
setClientValuesToStaff (line 733)

sets the client values to according staff values each CLI_xxx is set to CST_xxx and ADR_ID is set to CLI_DEFAULTADDR

  • version: pk-06-10-11
  • version: pk-06-12-07
  • since: pk-06-05-12
void setClientValuesToStaff ([boolean $debug = False])
  • boolean $debug
setCliId (line 777)

sets the client ID

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

  • version: pk-08-02-20
boolean setCliId (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug
setFORMPOST (line 706)

sets post array with form checks

  • todo: sometimes CST_CREATOR is overwritten witch current user check why
  • since: pk-06-10-11
bool setFORMPOST ( &$frmObj,  $dbval, [boolean $debug = False], [boolean $asPopulate = True], [boolean $strict = False], DBMS_FORM $frmObj, array $dbVal)
  • DBMS_FORM $frmObj: a formObj as ref
  • array $dbVal: array with data
  • boolean $debug
  • boolean $asPopulate
  • boolean $strict: only set columns of $this->myTable and "OBJVALS_".$this->myTable
  • &$frmObj
  • $dbval
setId (line 279)

sets the id

void setId (int $aId)
  • int $aId
setTypeObj (line 349)

sets the type object

  • since: pk-06-10-02
void setTypeObj ( &$aTypeObj, CLI_STAFF_TYPE $aTypeObj)
setUSR_ID (line 920)

sets the user id and updates the Client user Table

  • since: pk-06-01-17
boolean setUSR_ID (int $aId, [boolean $debug = False])
  • int $aId
  • boolean $debug
set_TypeId (line 317)

sets the client type id

  • version: pk-06-10-02
  • since: pk-06-01-16
void set_TypeId (int $aType, [ $debug = False])
  • int $aType
  • $debug
userCanDelete (line 1218)

returns if the current user can edit the client data

  • since: pk-06-10-26
void userCanDelete ([boolean $debug = False])
  • boolean $debug
userCanEdit (line 1183)

returns if the current user can edit the client data

  • since: pk-06-10-26
void userCanEdit ([boolean $debug = False])
  • boolean $debug
userCanShow (line 1151)

returns if the current user can show the client data

  • since: pk-06-10-02
void userCanShow ([boolean $debug = False])
  • boolean $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 53)
  • since: pk-08-02-04

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:38:18 +0100 by phpDocumentor 1.4.0a2