Zend_Validate_HostnamePlease note there are two standalone test scripts for testing IDN characters due to problems with file encoding.
The first is tests/Zend/Validate/HostnameTestStandalone.php which is designed to be run on the command line.
The second is tests/Zend/Validate/HostnameTestForm.php which is designed to be run via HTML to allow users to test entering UTF-8 characters in a form.
Located in /Validate/Hostname.php (line 54)
Zend_Validate_Abstract | --Zend_Validate_Hostname
void
__construct
([integer $allow = self::ALLOW_DNS], [boolean $validateIdn = true], [boolean $validateTld = true], [Zend_Validate_Ip $ipValidator = null])
integer
$_allow
(line 126)
Bit field of ALLOW constants; determines which types of hostnames are allowed
array
$_messageTemplates
= array(
array
$_messageVariables
= array(
string
$_tld
(line 172)
array
$_validTlds
= array(Array of valid top-level-domains
Inherited from Zend_Validate_Abstract
Zend_Validate_Abstract::$_errors
Zend_Validate_Abstract::$_messages
Zend_Validate_Abstract::$_value
Constructor __construct (line 184)
Sets validator options
getAllow (line 213)
Returns the allow option
isValid (line 277)
Defined by Zend_Validate_Interface
Returns true if and only if the $value is a valid hostname with respect to the current allow option
setAllow (line 224)
Sets the allow option
setIpValidator (line 200)
setValidateIdn (line 237)
Set whether IDN domains are validated
This only applies when DNS hostnames are validated
setValidateTld (line 249)
Set whether the TLD element of a hostname is validated
This only applies when DNS hostnames are validated
Inherited From Zend_Validate_Abstract
Zend_Validate_Abstract::getErrors()
Zend_Validate_Abstract::getMessages()
Zend_Validate_Abstract::setMessage()
Zend_Validate_Abstract::setMessages()
Zend_Validate_Abstract::_createMessage()
Zend_Validate_Abstract::_error()
Zend_Validate_Abstract::_setValue()
Zend_Validate_Abstract::__get()
ALLOW_ALL
= 7
(line 105)
Allows all types of hostnames
ALLOW_DNS
= 1
(line 90)
Allows Internet domain names (e.g., example.com)
ALLOW_IP
= 2
(line 95)
Allows IP addresses
ALLOW_LOCAL
= 4
(line 100)
Allows local network names (e.g., localhost, www.localdomain)
INVALID_DASH
= 'hostnameDashCharacter'
(line 59)
INVALID_HOSTNAME
= 'hostnameInvalidHostname'
(line 62)
INVALID_HOSTNAME_SCHEMA
= 'hostnameInvalidHostnameSchema'
(line 60)
INVALID_LOCAL_NAME
= 'hostnameInvalidLocalName'
(line 63)
IP_ADDRESS_NOT_ALLOWED
= 'hostnameIpAddressNotAllowed'
(line 57)
LOCAL_NAME_NOT_ALLOWED
= 'hostnameLocalNameNotAllowed'
(line 64)
UNDECIPHERABLE_TLD
= 'hostnameUndecipherableTld'
(line 61)
UNKNOWN_TLD
= 'hostnameUnknownTld'
(line 58)
Documentation generated on Sun, 27 May 2007 23:24:35 -0700 by phpDocumentor 1.3.2