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


Public Member Functions | |
| getMessages () | |
| getMessageVariables () | |
| getMessageTemplates () | |
| setMessage ($messageString, $messageKey=null) | |
| setMessages (array $messages) | |
| __get ($property) | |
| getErrors () | |
| setObscureValue ($flag) | |
| getObscureValue () | |
| setTranslator ($translator=null) | |
| getTranslator () | |
| hasTranslator () | |
| setDisableTranslator ($flag) | |
| translatorIsDisabled () | |
Static Public Member Functions | |
| static | setDefaultTranslator ($translator=null) |
| static | getDefaultTranslator () |
| static | hasDefaultTranslator () |
| static | getMessageLength () |
| static | setMessageLength ($length=-1) |
Protected Member Functions | |
| _createMessage ($messageKey, $value) | |
| _error ($messageKey, $value=null) | |
| _setValue ($value) | |
Protected Attributes | |
| $_value | |
| $_messageVariables = array() | |
| $_messageTemplates = array() | |
| $_messages = array() | |
| $_obscureValue = false | |
| $_errors = array() | |
| $_translator | |
| $_translatorDisabled = false | |
Static Protected Attributes | |
| static | $_defaultTranslator |
| static | $_messageLength = -1 |
Definition at line 33 of file Abstract.php.
| __get | ( | $ | property | ) |
Magic function returns the value of the requested property, if and only if it is the value or a message variable.
| string | $property |
| Zend_Validate_Exception |
Definition at line 183 of file Abstract.php.
| _createMessage | ( | $ | messageKey, |
| $ | value | ||
| ) | [protected] |
Constructs and returns a validation failure message with the given message key and value.
Returns null if and only if $messageKey does not correspond to an existing template.
If a translator is available and a translation exists for $messageKey, the translation will be used.
| string | $messageKey | |
| string | $value |
Definition at line 210 of file Abstract.php.


| _error | ( | $ | messageKey, |
| $ | value = null |
||
| ) | [protected] |
| string | $messageKey | |
| string | $value | OPTIONAL |
Definition at line 258 of file Abstract.php.


| _setValue | ( | $ | value | ) | [protected] |
Sets the value to be validated and clears the messages and errors arrays
| mixed | $value |
Definition at line 277 of file Abstract.php.

| static getDefaultTranslator | ( | ) | [static] |
Get default translation object for all validate objects
Definition at line 388 of file Abstract.php.


| getErrors | ( | ) |
Returns array of validation failure message codes
Definition at line 290 of file Abstract.php.
| static getMessageLength | ( | ) | [static] |
Returns the maximum allowed message length
Definition at line 442 of file Abstract.php.

| getMessages | ( | ) |
Returns array of validation failure messages
Implements Zend_Validate_Interface.
Definition at line 108 of file Abstract.php.
Returns the message templates from the validator
Definition at line 128 of file Abstract.php.
Returns an array of the names of variables that are used in constructing validation failure messages
Definition at line 118 of file Abstract.php.
| getObscureValue | ( | ) |
Retrieve flag indicating whether or not value should be obfuscated in messages
Definition at line 313 of file Abstract.php.

| getTranslator | ( | ) |
Return translation object
Definition at line 342 of file Abstract.php.


| static hasDefaultTranslator | ( | ) | [static] |
Is there a default translation object set?
Definition at line 410 of file Abstract.php.
| hasTranslator | ( | ) |
Does this validator have its own specific translator?
Definition at line 360 of file Abstract.php.
| static setDefaultTranslator | ( | $ | translator = null | ) | [static] |
Set default translation object for all validate objects
| Zend_Translate | Zend_Translate_Adapter | null | $translator |
Definition at line 371 of file Abstract.php.
| setDisableTranslator | ( | $ | flag | ) |
Indicate whether or not translation should be disabled
| bool | $flag |
Definition at line 421 of file Abstract.php.
| setMessage | ( | $ | messageString, |
| $ | messageKey = null |
||
| ) |
Sets the validation failure message template for a particular key
| string | $messageString | |
| string | $messageKey | OPTIONAL |
| Zend_Validate_Exception |
Reimplemented in Zend_Validate_EmailAddress.
Definition at line 141 of file Abstract.php.

| static setMessageLength | ( | $ | length = -1 | ) | [static] |
Sets the maximum allowed message length
| integer | $length |
Definition at line 452 of file Abstract.php.
| setMessages | ( | array $ | messages | ) |
Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings.
| array | $messages |
Definition at line 167 of file Abstract.php.


| setObscureValue | ( | $ | flag | ) |
Set flag indicating whether or not value should be obfuscated in messages
| bool | $flag |
Definition at line 301 of file Abstract.php.
| setTranslator | ( | $ | translator = null | ) |
Set translation object
| Zend_Translate | Zend_Translate_Adapter | null | $translator |
Definition at line 324 of file Abstract.php.

Is translation disabled?
Definition at line 432 of file Abstract.php.

$_defaultTranslator [static, protected] |
Definition at line 88 of file Abstract.php.
$_errors = array() [protected] |
Definition at line 76 of file Abstract.php.
$_messageLength = -1 [static, protected] |
Definition at line 101 of file Abstract.php.
$_messages = array() [protected] |
Definition at line 61 of file Abstract.php.
$_messageTemplates = array() [protected] |
Reimplemented in Zend_Validate_CreditCard, Zend_Validate_Hostname, Zend_Validate_NotEmpty, Zend_Validate_File_Upload, Zend_Validate_Alnum, Zend_Validate_Alpha, Zend_Validate_EmailAddress, Zend_Validate_Sitemap_Lastmod, Zend_Validate_Sitemap_Loc, Zend_Validate_Ccnum, Zend_Validate_File_ImageSize, Zend_Validate_Sitemap_Changefreq, Zend_Validate_Sitemap_Priority, Zend_Validate_Digits, Zend_Validate_Between, Zend_Validate_Callback, Zend_Validate_File_MimeType, Zend_Validate_File_Size, Zend_Validate_File_WordCount, Zend_Validate_File_Crc32, Zend_Validate_File_FilesSize, Zend_Validate_File_Hash, Zend_Validate_File_IsCompressed, Zend_Validate_File_IsImage, Zend_Validate_File_Md5, Zend_Validate_File_Sha1, Zend_Validate_Barcode, Zend_Validate_Db_Abstract, Zend_Validate_File_Count, Zend_Validate_Iban, Zend_Validate_File_ExcludeExtension, Zend_Validate_File_Extension, Zend_Validate_Float, Zend_Validate_Int, Zend_Validate_Isbn, Zend_Validate_PostCode, Zend_Validate_Date, Zend_Validate_File_Exists, Zend_Validate_File_NotExists, Zend_Validate_Identical, Zend_Validate_Hex, Zend_Validate_Regex, Zend_Validate_StringLength, Zend_Validate_Ip, Zend_Validate_GreaterThan, Zend_Validate_InArray, and Zend_Validate_LessThan.
Definition at line 54 of file Abstract.php.
$_messageVariables = array() [protected] |
Reimplemented in Zend_Validate_EmailAddress, Zend_Validate_Hostname, Zend_Validate_File_Extension, Zend_Validate_File_ImageSize, Zend_Validate_Between, Zend_Validate_File_Size, Zend_Validate_File_Exists, Zend_Validate_Barcode, Zend_Validate_File_Count, Zend_Validate_File_MimeType, Zend_Validate_Date, Zend_Validate_Identical, Zend_Validate_StringLength, Zend_Validate_Regex, Zend_Validate_GreaterThan, and Zend_Validate_LessThan.
Definition at line 47 of file Abstract.php.
$_obscureValue = false [protected] |
Definition at line 68 of file Abstract.php.
$_translator [protected] |
Definition at line 82 of file Abstract.php.
$_translatorDisabled = false [protected] |
Definition at line 94 of file Abstract.php.
$_value [protected] |
Definition at line 40 of file Abstract.php.