Class: I2CE FormStorage multi flat: Difference between revisions

From IHRIS Wiki
No edit summary
No edit summary
Line 2: Line 2:
*Extends the class: [[Class: I2CE_FormStorage_DB | I2CE_FormStorage_DB]].
*Extends the class: [[Class: I2CE_FormStorage_DB | I2CE_FormStorage_DB]].
*Location: Part of the module [[I2CE Module List#forms-storage-multiflat|forms-storage-multiflat]] in the package [https://launchpad.net/i2ce I2CE]
*Location: Part of the module [[I2CE Module List#forms-storage-multiflat|forms-storage-multiflat]] in the package [https://launchpad.net/i2ce I2CE]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.1-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php]
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/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
Line 9: Line 9:
===$storage_options_cache===
===$storage_options_cache===
of I2CE_MagicDataNodes.  The keys are the names of forms which have flat storage.
of I2CE_MagicDataNodes.  The keys are the names of forms which have flat storage.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L77 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 77
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $storage_options_cache
*Type: protected [http://www.php.net/manual/en/language.types.array.php array ] $storage_options_cache


===$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.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L107 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 107
*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.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L112 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 112
*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.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L142 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 142
*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.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L122 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 122
*Signature: public function __construct($name,$global_options)
*Signature: public function __construct($name,$global_options)
*Parameters:
*Parameters:
Line 32: Line 37:
***Default Value: array()
***Default Value: array()
===fieldIsColumn()===
===fieldIsColumn()===
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L80 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 80
*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.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L89 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 89
*Signature: protected function getFieldData($data)
*Signature: protected function getFieldData($data)
*Parameters:
*Parameters:
Line 41: Line 48:
===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.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L149 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 149
*Signature: protected function getFormObj($form)
*Signature: protected function getFormObj($form)
*Parameters:
*Parameters:
Line 47: Line 55:
===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.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L175 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 175
*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)
*Parameters:
*Parameters:
Line 62: Line 71:
===getStorageOptions()===
===getStorageOptions()===
Checks that the storage mechansim for the given form is 'multi_flat' and has storage options.
Checks that the storage mechansim for the given form is 'multi_flat' and has storage options.
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0.2-release/annotate/head:/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php#L50 i2ce/modules/Forms/modules/FormStorage/modules/FormStorageMultiFlat/lib/I2CE_FormStorage_multi_flat.php] on line 50
*Signature: protected function getStorageOptions($form)
*Signature: protected function getStorageOptions($form)
*Parameters:
*Parameters:
Line 68: Line 78:
===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.2-release/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

Revision as of 09:50, 10 November 2009

This article describes the class I2CE_FormStorage_multi_flat.

@filesource Class I2CE_FormStorage_multi_flat

Variables

$storage_options_cache

of I2CE_MagicDataNodes. The keys are the names of forms which have flat storage.

$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 175
  • Signature: public function getRequiredFieldsQuery($form,$fields,$id,$parent,$field_reference_callback,$mod_time)
  • 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
  • Returns: string
    the query or false on failed.

getStorageOptions()

Checks that the storage mechansim for the given form is 'multi_flat' and has storage options.

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

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

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

delete()

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

getFormsById()

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

populateHistory()

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

save()

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

compareFormsByFields()

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

getLimitedFields()

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

_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

$ordering

Theis protected variable is inherited from I2CE_FormStorage_Mechanism->$ordering

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()