/** * (non-PHPdoc) * @see IfwPsn_Vendor_Zend_Validate_Interface::isValid() */ public function isValid($value) { $this->_setValue($value); // Validate the URI $valid = IfwPsn_Vendor_Zend_Uri::check($value); if ($valid) { return true; } else { $this->_error(self::MSG_URI); return false; } }
/** * Validates if a string is valid as a sitemap location * * @link http://www.sitemaps.org/protocol.php#locdef <loc> * * @param string $value value to validate * @return boolean */ public function isValid($value) { if (!is_string($value)) { $this->_error(self::INVALID); return false; } $this->_setValue($value); $result = IfwPsn_Vendor_Zend_Uri::check($value); if ($result !== true) { $this->_error(self::NOT_VALID); return false; } return true; }