Class: I2CE FormStorage multi flat (Development): Difference between revisions

From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE_FormStorage_multi_flat}} This article describes the class ''I2CE_FormStorage_multi_flat'' . *Extends the class: [[Class: I2CE_FormStorage_DB (Developm…')
 
No edit summary
 
Line 2: Line 2:
This article describes the class ''I2CE_FormStorage_multi_flat'' .
This article describes the class ''I2CE_FormStorage_multi_flat'' .
*Extends the class: [[Class: I2CE_FormStorage_DB (Development) | I2CE_FormStorage_DB]].
*Extends the class: [[Class: I2CE_FormStorage_DB (Development) | I2CE_FormStorage_DB]].
*Location: Part of the module [[I2CE Module List (Development)#forms-storage-multiflat|forms-storage-multiflat]] in the package [https://launchpad.net/i2ce I2CE] 4.0-dev
*Location: Part of the module [[I2CE Module List (Development)#forms-storage-multiflat|forms-storage-multiflat]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L33 modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 33
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L33 modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 33
*Author: Carl Leitner <litlfred@ibiblio.org>
*Author: Carl Leitner <litlfred@ibiblio.org>
*Since: v4.0.1
*Since: v4.0.1
@filesource Class I2CE_FormStorage_multi_flat
@filesource Class I2CE_FormStorage_multi_flat
==Variables==
==Variables==
===$columnList===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L54 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 54
*Type: static protected $columnList
===$databases===
===$databases===
sting.  Keys are componentities and values are the assoicated database
sting.  Keys are componentities and values are the assoicated database
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L73 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 73
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L123 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 123
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $databases
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $databases


===$componentized_forms===
===$componentized_forms===
componentized_forms. The array of componentized forms
componentized_forms. The array of componentized forms
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L78 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 78
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L128 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 128
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $componentized_forms
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $componentized_forms


===$formObjs===
===$formObjs===
.  Keys are form names, values are instanceof I2CE_Form
.  Keys are form names, values are instanceof I2CE_Form
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L108 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 108
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L158 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 158
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $formObjs
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $formObjs


Line 26: Line 30:
===__construct()===
===__construct()===
The constructor for the storage mechanism
The constructor for the storage mechanism
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L88 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 88
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L138 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 138
*Signature: public function __construct($name,$global_options)
*Signature: public function __construct($name,$global_options)
*Parameters:
*Parameters:
Line 33: Line 37:
***Default Value: array()
***Default Value: array()
===fieldIsColumn()===
===fieldIsColumn()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L46 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 46
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L46 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 46
*Signature: protected function fieldIsColumn($data)
*Signature: protected function fieldIsColumn($data)
*Parameters:
*Parameters:
**$data  
**$data  
===getFieldData()===
===getFieldData()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L55 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 55
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L82 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 82
*Signature: protected function getFieldData($data)
*Signature: protected function getFieldData($data,$database,$table)
*Parameters:
*Parameters:
**$data  
**$data  
**$database
***Default Value: null
**$table
***Default Value: null
===getFormObj()===
===getFormObj()===
Get a (cached) form object for the given form
Get a (cached) form object for the given form
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L115 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 115
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L165 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 165
*Signature: protected function getFormObj($form)
*Signature: protected function getFormObj($form)
*Parameters:
*Parameters:
Line 51: Line 59:
===getRequiredFieldsQuery()===
===getRequiredFieldsQuery()===
Construct a query (to be used as a sub-select) to view the fields of the given form.  It always will return the id of the form as well @param callback $field_refernece_callback.  A callback function whose first arguement is the form, the second arguements is the field and which returns the way the field value should be references as a field.  If the callback is null (the default) then the reference used is "$form+$field"
Construct a query (to be used as a sub-select) to view the fields of the given form.  It always will return the id of the form as well @param callback $field_refernece_callback.  A callback function whose first arguement is the form, the second arguements is the field and which returns the way the field value should be references as a field.  If the callback is null (the default) then the reference used is "$form+$field"
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L141 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 141
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L192 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 192
*Signature: public function getRequiredFieldsQuery($form,$fields,$id,$parent,$field_reference_callback,$mod_time)
*Signature: public function getRequiredFieldsQuery($form,$fields,$id,$parent,$field_reference_callback,$mod_time,$user)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.string.php string ] $form
** [http://www.php.net/manual/en/language.types.string.php string ] $form
Line 64: Line 72:
** integer $mod_time <br/>Defaults to -1.  If non-negative, we only list the requested fields for an id if at least one of them has a modification time greater than or equal to $mod_time.  If the form storage has no way of tracking modifucation time, all entries are listed.
** integer $mod_time <br/>Defaults to -1.  If non-negative, we only list the requested fields for an id if at least one of them has a modification time greater than or equal to $mod_time.  If the form storage has no way of tracking modifucation time, all entries are listed.
***Default Value: -1
***Default Value: -1
** [http://www.php.net/manual/en/language.pseudo-types.php mixed ] $user <br/>The user id of the user to limit the results to so it only returns results limited to that user.  This can be a single value or an array
***Default Value: false
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>the query or false on failed.
*Returns: [http://www.php.net/manual/en/language.types.string.php string ]<br/>the query or false on failed.
===hasColumn()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L56 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 56
*Signature: protected function hasColumn($col,$database,$table)
*Parameters:
**$col
**$database
**$table
===isWritable()===
===isWritable()===
Checks to see if this storage mechansim is writable
Checks to see if this storage mechansim is writable
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L39 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 39
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L39 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 39
*Signature: public function isWritable()
*Signature: public function isWritable()
*Returns: boolean.<br/>false
*Returns: boolean.<br/>false
Line 82: Line 99:
===getRecords()===
===getRecords()===
This public method is inherited from [[Class: I2CE_FormStorage_DB (Development)#getRecords() | I2CE_FormStorage_DB->getRecords()]]
This public method is inherited from [[Class: I2CE_FormStorage_DB (Development)#getRecords() | I2CE_FormStorage_DB->getRecords()]]
===globalFieldUpdateBySQL()===
This public method is inherited from [[Class: I2CE_FormStorage_DB (Development)#globalFieldUpdateBySQL() | I2CE_FormStorage_DB->globalFieldUpdateBySQL()]]
===hasGlobalFieldUpdateBySql()===
This public method is inherited from [[Class: I2CE_FormStorage_DB (Development)#hasGlobalFieldUpdateBySql() | I2CE_FormStorage_DB->hasGlobalFieldUpdateBySql()]]


===listDisplayFields()===
===listDisplayFields()===
Line 109: Line 132:
===FF_save()===
===FF_save()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#FF_save() | I2CE_FormStorage_Mechanism->FF_save()]]
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#FF_save() | I2CE_FormStorage_Mechanism->FF_save()]]
===changeID()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#changeID() | I2CE_FormStorage_Mechanism->changeID()]]


===delete()===
===delete()===
Line 115: Line 141:
===getFormsById()===
===getFormsById()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#getFormsById() | I2CE_FormStorage_Mechanism->getFormsById()]]
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#getFormsById() | I2CE_FormStorage_Mechanism->getFormsById()]]
===globalFieldUpdateByFunction()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#globalFieldUpdateByFunction() | I2CE_FormStorage_Mechanism->globalFieldUpdateByFunction()]]
===hasRecord()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#hasRecord() | I2CE_FormStorage_Mechanism->hasRecord()]]


===populateHistory()===
===populateHistory()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#populateHistory() | I2CE_FormStorage_Mechanism->populateHistory()]]
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#populateHistory() | I2CE_FormStorage_Mechanism->populateHistory()]]
===release()===
This public method is inherited from [[Class: I2CE_FormStorage_Mechanism (Development)#release() | I2CE_FormStorage_Mechanism->release()]]


===save()===
===save()===

Latest revision as of 09:14, 6 May 2015


This article describes the class I2CE_FormStorage_multi_flat .

@filesource Class I2CE_FormStorage_multi_flat

Variables

$columnList

$databases

sting. Keys are componentities and values are the assoicated database

$componentized_forms

componentized_forms. The array of componentized forms

$formObjs

. Keys are form names, values are instanceof I2CE_Form

Methods

__construct()

The constructor for the storage mechanism

fieldIsColumn()

getFieldData()

getFormObj()

Get a (cached) form object for the given form

getRequiredFieldsQuery()

Construct a query (to be used as a sub-select) to view the fields of the given form. It always will return the id of the form as well @param callback $field_refernece_callback. A callback function whose first arguement is the form, the second arguements is the field and which returns the way the field value should be references as a field. If the callback is null (the default) then the reference used is "$form+$field"

  • Defined in i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php on line 192
  • Signature: public function getRequiredFieldsQuery($form,$fields,$id,$parent,$field_reference_callback,$mod_time,$user)
  • Parameters:
    • string $form
    • mixed $fields
      Either a string, the field, or an array of string, the fields.
    • mixed $id
      Defaults to null. If non-null it is the id that we wish to limit to.
      • Default Value: null
    • boolean $parent
      Defaults to false. If true, we include the parent id as a referenced field If it is scalar and non-boolean, it is consider to be the ID of the parent, and then we get all forms with parent the given id.
      • Default Value: false
    • $field_reference_callback
      • Default Value: null
    • integer $mod_time
      Defaults to -1. If non-negative, we only list the requested fields for an id if at least one of them has a modification time greater than or equal to $mod_time. If the form storage has no way of tracking modifucation time, all entries are listed.
      • Default Value: -1
    • mixed $user
      The user id of the user to limit the results to so it only returns results limited to that user. This can be a single value or an array
      • Default Value: false
  • Returns: string
    the query or false on failed.

hasColumn()

isWritable()

Checks to see if this storage mechansim is writable

Inherited Methods

FF_populateHistory()

This public method is inherited from I2CE_FormStorage_DB->FF_populateHistory()

getFields()

This public method is inherited from I2CE_FormStorage_DB->getFields()

getIdsAsChild()

This public method is inherited from I2CE_FormStorage_DB->getIdsAsChild()

getRecords()

This public method is inherited from I2CE_FormStorage_DB->getRecords()

globalFieldUpdateBySQL()

This public method is inherited from I2CE_FormStorage_DB->globalFieldUpdateBySQL()

hasGlobalFieldUpdateBySql()

This public method is inherited from I2CE_FormStorage_DB->hasGlobalFieldUpdateBySql()

listDisplayFields()

This public method is inherited from I2CE_FormStorage_DB->listDisplayFields()

listFields()

This public method is inherited from I2CE_FormStorage_DB->listFields()

lookupDisplayField()

This public method is inherited from I2CE_FormStorage_DB->lookupDisplayField()

lookupField()

This public method is inherited from I2CE_FormStorage_DB->lookupField()

populate()

This public method is inherited from I2CE_FormStorage_DB->populate()

search()

This public method is inherited from I2CE_FormStorage_DB->search()

queryLastListCount()

This protected method is inherited from I2CE_FormStorage_DB->queryLastListCount()

FF_IG_setSequence()

This public method is inherited from I2CE_FormStorage_Mechanism->FF_IG_setSequence()

FF_save()

This public method is inherited from I2CE_FormStorage_Mechanism->FF_save()

changeID()

This public method is inherited from I2CE_FormStorage_Mechanism->changeID()

delete()

This public method is inherited from I2CE_FormStorage_Mechanism->delete()

getFormsById()

This public method is inherited from I2CE_FormStorage_Mechanism->getFormsById()

globalFieldUpdateByFunction()

This public method is inherited from I2CE_FormStorage_Mechanism->globalFieldUpdateByFunction()

hasRecord()

This public method is inherited from I2CE_FormStorage_Mechanism->hasRecord()

populateHistory()

This public method is inherited from I2CE_FormStorage_Mechanism->populateHistory()

release()

This public method is inherited from I2CE_FormStorage_Mechanism->release()

save()

This public method is inherited from I2CE_FormStorage_Mechanism->save()

setStorageOptions()

This public method is inherited from I2CE_FormStorage_Mechanism->setStorageOptions()

compareFormsByFields()

This protected method is inherited from I2CE_FormStorage_Mechanism->compareFormsByFields()

getLimitedFields()

This protected method is inherited from I2CE_FormStorage_Mechanism->getLimitedFields()

getStorageOptions()

This protected method is inherited from I2CE_FormStorage_Mechanism->getStorageOptions()

_hasMethod()

This public method is inherited from I2CE_Fuzzy->_hasMethod()

Inherited Variables

$db

Theis protected variable is inherited from I2CE_FormStorage_DB->$db

$name

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$name

$global_options

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$global_options

$storage_options_cache

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$storage_options_cache

$ordering

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$ordering

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()