Public Member Functions | Public Attributes | Protected Attributes

Robo47_Validate_Uri Class Reference

List of all members.

Public Member Functions

 isValid ($value)

Public Attributes

const NO_VALID_URI = 'noValidUri'
 Validation failure message key for when the value is not a valid url.

Protected Attributes

 $_message = ''
 $_messageTemplates
 $_messageVariables

Detailed Description

Definition at line 32 of file Uri.php.


Member Function Documentation

Robo47_Validate_Uri::isValid ( value  ) 
Parameters:
mixed $value

Definition at line 64 of file Uri.php.

    {
        $this->_setValue($value);
        try {
            $uri = Zend_Uri::factory($value);
        } catch (Exception $e) {
            $this->_message = $e->getMessage();
            $this->_error(self::NO_VALID_URI, $value);
            return false;
        }
        return $uri->valid();
    }


Member Data Documentation

Robo47_Validate_Uri::$_message = '' [protected]

Definition at line 59 of file Uri.php.

Robo47_Validate_Uri::$_messageTemplates [protected]
Initial value:
 array(
        self::NO_VALID_URI => "URI '%value%' is not valid: '%message%'"
    )

Definition at line 44 of file Uri.php.

Robo47_Validate_Uri::$_messageVariables [protected]
Initial value:
 array(
        'message' => '_message',
        'value' => '_value'
    )

Definition at line 52 of file Uri.php.

const Robo47_Validate_Uri::NO_VALID_URI = 'noValidUri'

Validation failure message key for when the value is not a valid url.

Definition at line 37 of file Uri.php.


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