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

Public Member Functions

 __construct ($pattern)
 getPattern ()
 setPattern ($pattern)
 isValid ($value)

Data Fields

const INVALID = 'regexInvalid'
const NOT_MATCH = 'regexNotMatch'
const ERROROUS = 'regexErrorous'

Protected Attributes

 $_messageTemplates
 $_messageVariables
 $_pattern

Detailed Description

Definition at line 33 of file Regex.php.


Constructor & Destructor Documentation

__construct ( pattern)

Sets validator options

Parameters:
string | Zend_Config$pattern
Exceptions:
Zend_Validate_ExceptionOn missing 'pattern' parameter
Returns:
void

Definition at line 69 of file Regex.php.

Here is the call graph for this function:


Member Function Documentation

Returns the pattern option

Returns:
string

Definition at line 92 of file Regex.php.

isValid ( value)

Defined by Zend_Validate_Interface

Returns true if and only if $value matches against the pattern option

Parameters:
string$value
Returns:
boolean

Implements Zend_Validate_Interface.

Definition at line 125 of file Regex.php.

Here is the call graph for this function:

setPattern ( pattern)

Sets the pattern option

Parameters:
string$pattern
Exceptions:
Zend_Validate_Exceptionif there is a fatal error in pattern matching
Returns:
Zend_Validate_Regex Provides a fluent interface

Definition at line 104 of file Regex.php.

Here is the caller graph for this function:


Field Documentation

$_messageTemplates [protected]
Initial value:
 array(
        self::INVALID   => "Invalid type given, value should be string, integer or float",
        self::NOT_MATCH => "'%value%' does not match against pattern '%pattern%'",
        self::ERROROUS  => "There was an internal error while using the pattern '%pattern%'",
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 42 of file Regex.php.

$_messageVariables [protected]
Initial value:
 array(
        'pattern' => '_pattern'
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 51 of file Regex.php.

$_pattern [protected]

Definition at line 60 of file Regex.php.

const ERROROUS = 'regexErrorous'

Definition at line 37 of file Regex.php.

const INVALID = 'regexInvalid'

Definition at line 35 of file Regex.php.

const NOT_MATCH = 'regexNotMatch'

Definition at line 36 of file Regex.php.


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