Public Member Functions | Data Fields | Protected Attributes

Zend_Validate_Regex Class Reference

Inheritance diagram for Zend_Validate_Regex:
Zend_Validate_Abstract Zend_Validate_Interface

Public Member Functions

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

Data Fields

const INVALID = 'regexInvalid'
const NOT_MATCH = 'regexNotMatch'

Protected Attributes

 $_messageTemplates
 $_messageVariables
 $_pattern

Detailed Description

Definition at line 36 of file Regex.php.


Constructor & Destructor Documentation

__construct ( pattern )

Sets validator options

Parameters:
string$pattern
Returns:
void

Definition at line 69 of file Regex.php.


Member Function Documentation

getPattern (  )

Returns the pattern option

Returns:
string

Definition at line 79 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
Exceptions:
Zend_Validate_Exceptionif there is a fatal error in pattern matching
Returns:
boolean

Implements Zend_Validate_Interface.

Definition at line 105 of file Regex.php.

setPattern ( pattern )

Sets the pattern option

Parameters:
string$pattern
Returns:
Zend_Validate_Regex Provides a fluent interface

Definition at line 90 of file Regex.php.


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%'"
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 44 of file Regex.php.

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

Reimplemented from Zend_Validate_Abstract.

Definition at line 52 of file Regex.php.


The documentation for this class was generated from the following file: