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

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

Detailed Description

Definition at line 33 of file Abstract.php.


Member Function Documentation

__get ( property)

Magic function returns the value of the requested property, if and only if it is the value or a message variable.

Parameters:
string$property
Returns:
mixed
Exceptions:
Zend_Validate_Exception
See also:
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.

Parameters:
string$messageKey
string$value
Returns:
string

Definition at line 210 of file Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_error ( messageKey,
value = null 
) [protected]
Parameters:
string$messageKey
string$valueOPTIONAL
Returns:
void

Definition at line 258 of file Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

_setValue ( value) [protected]

Sets the value to be validated and clears the messages and errors arrays

Parameters:
mixed$value
Returns:
void

Definition at line 277 of file Abstract.php.

Here is the caller graph for this function:

static getDefaultTranslator ( ) [static]

Get default translation object for all validate objects

Returns:
Zend_Translate_Adapter|null

Definition at line 388 of file Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

getErrors ( )

Returns array of validation failure message codes

Returns:
array
Deprecated:
Since 1.5.0

Definition at line 290 of file Abstract.php.

static getMessageLength ( ) [static]

Returns the maximum allowed message length

Returns:
integer

Definition at line 442 of file Abstract.php.

Here is the caller graph for this function:

Returns array of validation failure messages

Returns:
array

Implements Zend_Validate_Interface.

Definition at line 108 of file Abstract.php.

Returns the message templates from the validator

Returns:
array

Definition at line 128 of file Abstract.php.

Returns an array of the names of variables that are used in constructing validation failure messages

Returns:
array

Definition at line 118 of file Abstract.php.

Retrieve flag indicating whether or not value should be obfuscated in messages

Returns:
bool

Definition at line 313 of file Abstract.php.

Here is the caller graph for this function:

Return translation object

Returns:
Zend_Translate_Adapter|null

Definition at line 342 of file Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

static hasDefaultTranslator ( ) [static]

Is there a default translation object set?

Returns:
boolean

Definition at line 410 of file Abstract.php.

Does this validator have its own specific translator?

Returns:
bool

Definition at line 360 of file Abstract.php.

static setDefaultTranslator ( translator = null) [static]

Set default translation object for all validate objects

Parameters:
Zend_Translate | Zend_Translate_Adapter | null$translator
Returns:
void

Definition at line 371 of file Abstract.php.

setDisableTranslator ( flag)

Indicate whether or not translation should be disabled

Parameters:
bool$flag
Returns:
Zend_Validate_Abstract

Definition at line 421 of file Abstract.php.

setMessage ( messageString,
messageKey = null 
)

Sets the validation failure message template for a particular key

Parameters:
string$messageString
string$messageKeyOPTIONAL
Returns:
Zend_Validate_Abstract Provides a fluent interface
Exceptions:
Zend_Validate_Exception

Reimplemented in Zend_Validate_EmailAddress.

Definition at line 141 of file Abstract.php.

Here is the caller graph for this function:

static setMessageLength ( length = -1) [static]

Sets the maximum allowed message length

Parameters:
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.

Parameters:
array$messages
Returns:
Zend_Validate_Abstract

Definition at line 167 of file Abstract.php.

Here is the call graph for this function:

Here is the caller graph for this function:

setObscureValue ( flag)

Set flag indicating whether or not value should be obfuscated in messages

Parameters:
bool$flag
Returns:
Zend_Validate_Abstract

Definition at line 301 of file Abstract.php.

setTranslator ( translator = null)

Set translation object

Parameters:
Zend_Translate | Zend_Translate_Adapter | null$translator
Returns:
Zend_Validate_Abstract

Definition at line 324 of file Abstract.php.

Here is the caller graph for this function:

Is translation disabled?

Returns:
bool

Definition at line 432 of file Abstract.php.

Here is the caller graph for this function:


Field Documentation

$_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.

$_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.


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