|
Moodle
2.2.1
http://www.collinsharper.com
|


Public Member Functions | |
| __construct ($options=array()) | |
| getMin () | |
| setMin ($min) | |
| getMax () | |
| setMax ($max) | |
| getEncoding () | |
| setEncoding ($encoding=null) | |
| isValid ($value) | |
Data Fields | |
| const | INVALID = 'stringLengthInvalid' |
| const | TOO_SHORT = 'stringLengthTooShort' |
| const | TOO_LONG = 'stringLengthTooLong' |
Protected Attributes | |
| $_messageTemplates | |
| $_messageVariables | |
| $_min | |
| $_max | |
| $_encoding | |
Definition at line 33 of file StringLength.php.
| __construct | ( | $ | options = array() | ) |
Sets validator options
| integer | array | Zend_Config | $options |
Definition at line 85 of file StringLength.php.

| getEncoding | ( | ) |
| getMax | ( | ) |
| getMin | ( | ) |
| isValid | ( | $ | value | ) |
Defined by Zend_Validate_Interface
Returns true if and only if the string length of $value is at least the min option and no greater than the max option (when the max option is not null).
| string | $value |
Implements Zend_Validate_Interface.
Definition at line 225 of file StringLength.php.

| setEncoding | ( | $ | encoding = null | ) |
Sets a new encoding to use
| string | $encoding |
Definition at line 199 of file StringLength.php.

| setMax | ( | $ | max | ) |
Sets the max option
| integer | null | $max |
| Zend_Validate_Exception |
Definition at line 165 of file StringLength.php.

| setMin | ( | $ | min | ) |
Sets the min option
| integer | $min |
| Zend_Validate_Exception |
Definition at line 134 of file StringLength.php.

$_encoding [protected] |
Definition at line 77 of file StringLength.php.
$_max [protected] |
Definition at line 70 of file StringLength.php.
$_messageTemplates [protected] |
array( self::INVALID => "Invalid type given, value should be a string", self::TOO_SHORT => "'%value%' is less than %min% characters long", self::TOO_LONG => "'%value%' is more than %max% characters long", )
Reimplemented from Zend_Validate_Abstract.
Definition at line 42 of file StringLength.php.
$_messageVariables [protected] |
array( 'min' => '_min', 'max' => '_max' )
Reimplemented from Zend_Validate_Abstract.
Definition at line 51 of file StringLength.php.
$_min [protected] |
Definition at line 61 of file StringLength.php.
| const INVALID = 'stringLengthInvalid' |
Definition at line 35 of file StringLength.php.
| const TOO_LONG = 'stringLengthTooLong' |
Definition at line 37 of file StringLength.php.
| const TOO_SHORT = 'stringLengthTooShort' |
Definition at line 36 of file StringLength.php.