Class: I2CE Module FormLimits (Development): Difference between revisions
No edit summary |
No edit summary |
||
Line 2: | Line 2: | ||
This article describes the class ''I2CE_Module_FormLimits'' . | This article describes the class ''I2CE_Module_FormLimits'' . | ||
*Extends the class: [[Class: I2CE_Module (Development) | I2CE_Module]]. | *Extends the class: [[Class: I2CE_Module (Development) | I2CE_Module]]. | ||
*Location: Part of the module [[I2CE Module List (Development)#form-limits|form-limits]] in the package [https://launchpad.net/i2ce I2CE] 4. | *Location: Part of the module [[I2CE Module List (Development)#form-limits|form-limits]] in the package [https://launchpad.net/i2ce I2CE] 4.1-dev | ||
*Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Source: Defined in the file [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L33 modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 33 | ||
*Author: Carl Leitner <litlfred@ibiblio.org> | *Author: Carl Leitner <litlfred@ibiblio.org> | ||
*Since: v4.0.6 | *Since: v4.0.6 | ||
Line 9: | Line 9: | ||
==Variables== | ==Variables== | ||
===$checkOperatorMap=== | ===$checkOperatorMap=== | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L255 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 255 | ||
*Type: static protected $checkOperatorMap | *Type: static protected $checkOperatorMap | ||
Line 15: | Line 15: | ||
===action_initialize()=== | ===action_initialize()=== | ||
Method called before the module is enabled for the first time. @param boolean -- returns true on success. false on error. | Method called before the module is enabled for the first time. @param boolean -- returns true on success. false on error. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L39 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 39 | ||
*Signature: public function action_initialize() | *Signature: public function action_initialize() | ||
===checkLimit()=== | ===checkLimit()=== | ||
Checks a limit expression for a field based on limit data | Checks a limit expression for a field based on limit data | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L101 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 101 | ||
*Signature: public function checkLimit($formObj,$limit_data) | *Signature: public function checkLimit($formObj,$limit_data) | ||
*Parameters: | *Parameters: | ||
Line 28: | Line 28: | ||
===checkWhereClause()=== | ===checkWhereClause()=== | ||
The implementation of the fuzzy method to check that a where clause is satisfied by the given form Walks down the where clause data create the WHERE query it defined. | The implementation of the fuzzy method to check that a where clause is satisfied by the given form Walks down the where clause data create the WHERE query it defined. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L144 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 144 | ||
*Signature: public function checkWhereClause($formObj,$expr) | *Signature: public function checkWhereClause($formObj,$expr) | ||
*Parameters: | *Parameters: | ||
Line 36: | Line 36: | ||
===createCheckFunction()=== | ===createCheckFunction()=== | ||
Create a check function based on the where data. The function takes on argument which is an array indexed by the field names and with values the value of the field. @param I2CE_Form $form @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 $data["$field'] | Create a check function based on the where data. The function takes on argument which is an array indexed by the field names and with values the value of the field. @param I2CE_Form $form @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 $data["$field'] | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L240 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 240 | ||
*Signature: public function createCheckFunction($formObj,$expr,$field_reference_callback,$func_args) | *Signature: public function createCheckFunction($formObj,$expr,$field_reference_callback,$func_args) | ||
*Parameters: | *Parameters: | ||
Line 48: | Line 48: | ||
===createCheckFunctionString()=== | ===createCheckFunctionString()=== | ||
Create a check function boolean expression based on the where data. The function takes on argument which is an array indexed by the field names and with values the value of the field. @param I2CE_Form $form @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 $data["$field'] | Create a check function boolean expression based on the where data. The function takes on argument which is an array indexed by the field names and with values the value of the field. @param I2CE_Form $form @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 $data["$field'] | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L272 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 272 | ||
*Signature: public function createCheckFunctionString($formObj,$expr,$field_reference_callback) | *Signature: public function createCheckFunctionString($formObj,$expr,$field_reference_callback) | ||
*Parameters: | *Parameters: | ||
Line 58: | Line 58: | ||
===createCheckLimitString()=== | ===createCheckLimitString()=== | ||
Checks a limit boolean expression for a field based on limit data @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 $data["$field'] | Checks a limit boolean expression for a field based on limit data @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 $data["$field'] | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L371 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 371 | ||
*Signature: public function createCheckLimitString($formObj,$limit_data,$field_reference_callback) | *Signature: public function createCheckLimitString($formObj,$limit_data,$field_reference_callback) | ||
*Parameters: | *Parameters: | ||
Line 69: | Line 69: | ||
===generateLimit()=== | ===generateLimit()=== | ||
Generates a limit expression for a form based on limit data. Called by {generateWhereClause()} @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" | Generates a limit expression for a form based on limit data. Called by {generateWhereClause()} @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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L426 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 426 | ||
*Signature: public function generateLimit($formObj,$limit_data,$field_reference_callback,$parent_ref) | *Signature: public function generateLimit($formObj,$limit_data,$field_reference_callback,$parent_ref) | ||
*Parameters: | *Parameters: | ||
Line 82: | Line 82: | ||
===generateWhereClause()=== | ===generateWhereClause()=== | ||
The implementation of the fuzzy method that recurses down the where clause data to make the limit part of a SQL query. Walks down the where clause data create the WHERE query it defined. @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" | The implementation of the fuzzy method that recurses down the where clause data to make the limit part of a SQL query. Walks down the where clause data create the WHERE query it defined. @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. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L465 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 465 | ||
*Signature: public function generateWhereClause($formObj,$expr,$field_reference_callback,$parent_ref) | *Signature: public function generateWhereClause($formObj,$expr,$field_reference_callback,$parent_ref) | ||
*Parameters: | *Parameters: | ||
Line 94: | Line 94: | ||
===getLimitStyles()=== | ===getLimitStyles()=== | ||
Implementation of fuzzy method on a I2CE_FormObject to determine what are the limit styles for a given field | Implementation of fuzzy method on a I2CE_FormObject to determine what are the limit styles for a given field | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L83 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 83 | ||
*Signature: public function getLimitStyles($formObj,$field) | *Signature: public function getLimitStyles($formObj,$field) | ||
*Parameters: | *Parameters: | ||
Line 102: | Line 102: | ||
===getMethods()=== | ===getMethods()=== | ||
The 'fuzzy' methods that this module implements. | The 'fuzzy' methods that this module implements. | ||
*Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4. | *Defined in [http://bazaar.launchpad.net/~intrahealth+informatics/i2ce/4.1-dev/annotate/head:/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php#L62 i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php] on line 62 | ||
*Signature: static public function getMethods() | *Signature: static public function getMethods() | ||
*Returns: an<br/>associative array. | *Returns: an<br/>associative array. | ||
Line 117: | Line 117: | ||
===action_enable()=== | ===action_enable()=== | ||
This public method is inherited from [[Class: I2CE_Module (Development)#action_enable() | I2CE_Module->action_enable()]] | This public method is inherited from [[Class: I2CE_Module (Development)#action_enable() | I2CE_Module->action_enable()]] | ||
===getCLIMethods()=== | ===getCLIMethods()=== |
Latest revision as of 08:15, 6 May 2015
This article describes the class I2CE_Module_FormLimits .
- Extends the class: I2CE_Module.
- Location: Part of the module form-limits in the package I2CE 4.1-dev
- Source: Defined in the file modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 33
- Author: Carl Leitner <litlfred@ibiblio.org>
- Since: v4.0.6
@filesource Class I2CE_Module_FormLimits
Variables
$checkOperatorMap
- Defined in i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 255
- Type: static protected $checkOperatorMap
Methods
action_initialize()
Method called before the module is enabled for the first time. @param boolean -- returns true on success. false on error.
- Defined in i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 39
- Signature: public function action_initialize()
checkLimit()
Checks a limit expression for a field based on limit data
- Defined in i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 101
- Signature: public function checkLimit($formObj,$limit_data)
- Parameters:
- Returns: boolean
or null on failure
checkWhereClause()
The implementation of the fuzzy method to check that a where clause is satisfied by the given form Walks down the where clause data create the WHERE query it defined.
- Defined in i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 144
- Signature: public function checkWhereClause($formObj,$expr)
- Parameters:
- Returns: boolean,
null on failure
createCheckFunction()
Create a check function based on the where data. The function takes on argument which is an array indexed by the field names and with values the value of the field. @param I2CE_Form $form @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 $data["$field']
- Defined in i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 240
- Signature: public function createCheckFunction($formObj,$expr,$field_reference_callback,$func_args)
- Parameters:
- Returns: false
on failure a funciton on sucess.
createCheckFunctionString()
Create a check function boolean expression based on the where data. The function takes on argument which is an array indexed by the field names and with values the value of the field. @param I2CE_Form $form @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 $data["$field']
- Defined in i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 272
- Signature: public function createCheckFunctionString($formObj,$expr,$field_reference_callback)
- Parameters:
- $formObj
- mixed $expr
array or class implementing ArrayAccess, Iterator, and Countable (e.g. MagicDataNode) . the where data. - $field_reference_callback
- Default Value: null
- Returns: false
on failure a string to which can be evalued as true/false on success.
createCheckLimitString()
Checks a limit boolean expression for a field based on limit data @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 $data["$field']
- Defined in i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 371
- Signature: public function createCheckLimitString($formObj,$limit_data,$field_reference_callback)
- Parameters:
- Returns: string
or false on failure
generateLimit()
Generates a limit expression for a form based on limit data. Called by {generateWhereClause()} @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/FormLimits/lib/I2CE_Module_FormLimits.php on line 426
- Signature: public function generateLimit($formObj,$limit_data,$field_reference_callback,$parent_ref)
- Parameters:
- Returns: string
SQL statement false on failure
generateWhereClause()
The implementation of the fuzzy method that recurses down the where clause data to make the limit part of a SQL query. Walks down the where clause data create the WHERE query it defined. @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/FormLimits/lib/I2CE_Module_FormLimits.php on line 465
- Signature: public function generateWhereClause($formObj,$expr,$field_reference_callback,$parent_ref)
- Parameters:
- Returns: SQL
statement, false on failure
getLimitStyles()
Implementation of fuzzy method on a I2CE_FormObject to determine what are the limit styles for a given field
- Defined in i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 83
- Signature: public function getLimitStyles($formObj,$field)
- Parameters:
- Returns: array
getMethods()
The 'fuzzy' methods that this module implements.
- Defined in i2ce/modules/Forms/modules/FormLimits/lib/I2CE_Module_FormLimits.php on line 62
- Signature: static public function getMethods()
- Returns: an
associative array.
Inherited Methods
__construct()
This public method is inherited from I2CE_Module->__construct()
action_configure()
This public method is inherited from I2CE_Module->action_configure()
action_disable()
This public method is inherited from I2CE_Module->action_disable()
action_enable()
This public method is inherited from I2CE_Module->action_enable()
getCLIMethods()
This public method is inherited from I2CE_Module->getCLIMethods()
getConfig()
This public method is inherited from I2CE_Module->getConfig()
getHooks()
This public method is inherited from I2CE_Module->getHooks()
post_update()
This public method is inherited from I2CE_Module->post_update()
pre_upgrade()
This public method is inherited from I2CE_Module->pre_upgrade()
upgrade()
This public method is inherited from I2CE_Module->upgrade()
_hasMethod()
This public method is inherited from I2CE_Fuzzy->_hasMethod()
Inherited Fuzzy Methods
launchBackgroundProcess()
This method is inherited from I2CE_Module->launchBackgroundProcess()
launchBackgroundPHPScript()
This method is inherited from I2CE_Module->launchBackgroundPHPScript()
launchBackgroundPage()
This method is inherited from I2CE_Module->launchBackgroundPage()
userMessage()
This method is inherited from I2CE_Fuzzy->userMessage()