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

Public Member Functions

 _findOperator ($name)
 validate ($values, $operator=null)
 getValidationScript ($operator=null)

Data Fields

 $_operators

Detailed Description

Definition at line 33 of file Compare.php.


Member Function Documentation

_findOperator ( name)

Returns the operator to use for comparing the values

private

Parameters:
stringoperator name
Returns:
string operator to use for validation

Definition at line 57 of file Compare.php.

Here is the caller graph for this function:

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 84 of file Compare.php.

Here is the call graph for this function:

validate ( values,
operator = null 
)

Definition at line 71 of file Compare.php.

Here is the call graph for this function:


Field Documentation

$_operators
Initial value:
 array(
        'eq'  => '==',
        'neq' => '!=',
        'gt'  => '>',
        'gte' => '>=',
        'lt'  => '<',
        'lte' => '<='
    )

Definition at line 40 of file Compare.php.


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