public function setPattern($pattern)
    {
        $this->_pattern = (string) $pattern;
        $status         = @preg_match($this->_pattern, "Test");

        if (false === $status) {
            // require_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception("Internal error while using the pattern '$this->_pattern'");
        }

        return $this;
    }
public function setPattern($pattern)
    {
        $this->_pattern = (string) $pattern;
        $status         = @preg_match($this->_pattern, "Test");

        if (false === $status) {
            // require_once 'Zend/Validate/Exception.php';
            throw new Zend_Validate_Exception("Internal error while using the pattern '$this->_pattern'");
        }

        return $this;
    }
public function setPattern ( $ pattern ) { $ this -> _pattern = ( string ) $ pattern ; $ status = @ preg_match ( $ this -> _pattern , "Test" ) ; if ( false === $ status ) { // require_once 'Zend/Validate/Exception.php'; throw new Zend_Validate_Exception ( "Internal error while using the pattern '$this->_pattern'" ) ; } return $ this ; }
Sets the pattern option

@param  string $pattern
@throws Zend_Validate_Exception if there is a fatal error in pattern matching
@return Zend_Validate_Regex Provides a fluent interface
Sets the pattern option