Class: I2CE CachedForm (Development): Difference between revisions

From IHRIS Wiki
(Created page with '{{otherversions|Class: I2CE_CachedForm}} This article describes the class ''I2CE_CachedForm'' . *Extends the class: I2CE_Fuzzy. *Location: P…')
 
No edit summary
 
Line 51: Line 51:
===createCacheTable()===
===createCacheTable()===
setup of the queries used to create and populate the cached table
setup of the queries used to create and populate the cached table
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php#L480 i2ce/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php] on line 480
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php#L500 i2ce/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php] on line 500
*Signature: protected function createCacheTable()
*Signature: protected function createCacheTable()
*Returns: boolean.<br/>True on success, false on error
*Returns: boolean.<br/>True on success, false on error
Line 61: Line 61:
===fastPopulate()===
===fastPopulate()===
Method used to populate the cache table in case the form storage mechanism is  DB like
Method used to populate the cache table in case the form storage mechanism is  DB like
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php#L374 i2ce/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php] on line 374
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php#L383 i2ce/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php] on line 383
*Signature: protected function fastPopulate()
*Signature: protected function fastPopulate($check_mod)
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $check_mod <br/>Defaults to true.  If false, it skips the mod time check
***Default Value: true
===generateCachedTable()===
===generateCachedTable()===
Generates the cahced table for the form
Generates the cahced table for the form
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php#L337 i2ce/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php] on line 337
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php#L345 i2ce/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php] on line 345
*Signature: public function generateCachedTable($check_stale)
*Signature: public function generateCachedTable($check_stale,$check_dirty)
*Parameters:
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $check_stale <br/>Defaults to true.  If false, it skips the staleness check
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $check_stale <br/>Defaults to true.  If false, it skips the staleness check
***Default Value: true
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $check_dirty <br/>Defaults to true.  If false, it skips the dirtiness check
***Default Value: true
***Default Value: true
===getCacheDatabase()===
===getCacheDatabase()===
Line 106: Line 111:
===slowPopulate()===
===slowPopulate()===
Method used to populate the cache table in case the form storage mechanism is not DB like
Method used to populate the cache table in case the form storage mechanism is not DB like
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php#L417 i2ce/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php] on line 417
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.0-dev/annotate/head:/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php#L431 i2ce/modules/Forms/modules/CachedForms/lib/I2CE_CachedForm.php] on line 431
*Signature: protected function slowPopulate()
*Signature: protected function slowPopulate($check_mod)
*Parameters:
** [http://www.php.net/manual/en/language.types.boolean.php boolean ] $check_mod <br/>Defaults to true.  If false, it skips the mod time check
***Default Value: true
===tableExists()===
===tableExists()===
Check to see if the cached table for this table exists and has the the proper fields for its columns.  If it is invalud, it will drop the table.
Check to see if the cached table for this table exists and has the the proper fields for its columns.  If it is invalud, it will drop the table.

Latest revision as of 07:55, 3 August 2010


This article describes the class I2CE_CachedForm .

I2CE_CachedForm

Variables

$form

The form we are caching

$database

the database name (unquoted)

$table_name

the table name for this form.

$short_table_name

the table name for this form without quotes and without the databse

$last_entry_database

the database name (unquoted) where last_entry is

$formObj

An instance of the form object

$formMech

An instance of the form storage mechansim for the form

Methods

__construct()

The constructor

createCacheTable()

setup of the queries used to create and populate the cached table

dropTable()

Drops the existing cached table from the database

fastPopulate()

Method used to populate the cache table in case the form storage mechanism is DB like

generateCachedTable()

Generates the cahced table for the form

getCacheDatabase()

Get the name of the database that the cached tables are stored in.

getCachedTableName()

Get the name of the cached table for the specfiied form.

getIDs()

Get the id's of the cached forms.

getLastCachedTime()

Get the last time that this form was chached

getStaleTime()

Get the time the cached form is considered stale

isStale()

Checks to see if the cached table is stale

slowPopulate()

Method used to populate the cache table in case the form storage mechanism is not DB like

tableExists()

Check to see if the cached table for this table exists and has the the proper fields for its columns. If it is invalud, it will drop the table.

Inherited Methods

_hasMethod()

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

Inherited Fuzzy Methods

userMessage()

This method is inherited from I2CE_Fuzzy->userMessage()