Moodle  2.2.1
http://www.collinsharper.com
HTML_QuickForm_Rule_Callback Class Reference
Inheritance diagram for HTML_QuickForm_Rule_Callback:
Collaboration diagram for HTML_QuickForm_Rule_Callback:

Public Member Functions

 validate ($value, $options=null)
 addData ($name, $callback, $class=null, $BCMode=false)
 getValidationScript ($options=null)

Data Fields

 $_data = array()
 $_BCMode = array()

Detailed Description

Validates values using callback functions or methods

Version:
1.0

Definition at line 27 of file Callback.php.


Member Function Documentation

addData ( name,
callback,
class = null,
BCMode = false 
)

Adds new callbacks to the callbacks list

Parameters:
string$nameName of rule
string$callbackName of function or method
string$className of class containing the method
bool$BCModeBackwards compatibility mode public

Definition at line 88 of file Callback.php.

getValidationScript ( options = null)

Returns the javascript test (the test should return true if the value is INVALID)

Parameters:
mixedOptions for the rule public
Returns:
array first element is code to setup validation, second is the check itself

Reimplemented from HTML_QuickForm_Rule.

Definition at line 99 of file Callback.php.

validate ( value,
options = null 
)

Validates a value using a callback

Parameters:
string$valueValue to be checked
mixed$optionsOptions for callback public
Returns:
boolean true if value is valid

Definition at line 61 of file Callback.php.


Field Documentation

$_BCMode = array()

Definition at line 51 of file Callback.php.

$_data = array()

Definition at line 39 of file Callback.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations