Validate/Hostname.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Validate  
Version
$Id: Hostname.php 25061 2012-11-02 21:24:09Z rob $  

\Zend_Validate_Hostname

Package: Zend\Validate
Please 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.

Parent(s)
\Zend_Validate_Abstract
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

>VConstant  CANNOT_DECODE_PUNYCODE = 'hostnameCannotDecodePunycode'
>VConstant  INVALID = 'hostnameInvalid'
>VConstant  INVALID_DASH = 'hostnameDashCharacter'
>VConstant  INVALID_HOSTNAME = 'hostnameInvalidHostname'
>VConstant  INVALID_HOSTNAME_SCHEMA = 'hostnameInvalidHostnameSchema'
>VConstant  INVALID_LOCAL_NAME = 'hostnameInvalidLocalName'
>VConstant  INVALID_URI = 'hostnameInvalidUri'
>VConstant  IP_ADDRESS_NOT_ALLOWED = 'hostnameIpAddressNotAllowed'
>VConstant  LOCAL_NAME_NOT_ALLOWED = 'hostnameLocalNameNotAllowed'
>VConstant  UNDECIPHERABLE_TLD = 'hostnameUndecipherableTld'
>VConstant  UNKNOWN_TLD = 'hostnameUnknownTld'
>VConstant  ALLOW_DNS = 1
Allows Internet domain names (e.g., example.com)
>VConstant  ALLOW_IP = 2
Allows IP addresses
>VConstant  ALLOW_LOCAL = 4
Allows local network names (e.g., localhost, www.localdomain)
>VConstant  ALLOW_URI = 8
Allows all types of hostnames
>VConstant  ALLOW_ALL = 15
Allows all types of hostnames

Properties

>VPropertyprotected\Zend_Translate $_defaultTranslator
staticinherited
Default translation object for all validate objects
Inherited from: \Zend_Validate_Abstract::$$_defaultTranslator
Details
Type
\Zend_Translate
Inherited_from
\Zend_Validate_Abstract::$$_defaultTranslator  
>VPropertyprotectedarray $_errors = array()
inherited
Array of validation failure message codes
Inherited from: \Zend_Validate_Abstract::$$_errors
Default valuearray()Details
Type
array
Inherited_from
\Zend_Validate_Abstract::$$_errors  
>VPropertyprotected$_idnLength = array('BIZ' => array(5 => 17, 11 => 15, 12 => 20), 'CN' => array(1 => 20), 'COM' => array(3 => 17, 5 => 20), 'HK' => array(1 => 15), 'INFO' => array(4 => 17), 'KR' => array(1 => 17), 'NET' => array(3 => 17, 5 => 20), 'ORG' => array(6 => 17), 'TW' => array(1 => 20), 'ایران' => array(1 => 30), '中国' => array(1 => 20), '公司' => array(1 => 20), '网络' => array(1 => 20))
Default valuearray('BIZ' => array(5 => 17, 11 => 15, 12 => 20), 'CN' => array(1 => 20), 'COM' => array(3 => 17, 5 => 20), 'HK' => array(1 => 15), 'INFO' => array(4 => 17), 'KR' => array(1 => 17), 'NET' => array(3 => 17, 5 => 20), 'ORG' => array(6 => 17), 'TW' => array(1 => 20), 'ایران' => array(1 => 30), '中国' => array(1 => 20), '公司' => array(1 => 20), '网络' => array(1 => 20))Details
Type
n/a
>VPropertyprotectedInteger $_messageLength = -1
staticinherited
Limits the maximum returned length of a error message
Inherited from: \Zend_Validate_Abstract::$$_messageLength
Default value-1Details
Type
Integer
Inherited_from
\Zend_Validate_Abstract::$$_messageLength  
>VPropertyprotectedarray $_messageTemplates = array(self::CANNOT_DECODE_PUNYCODE => "'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded", self::INVALID => "Invalid type given. String expected", self::INVALID_DASH => "'%value%' appears to be a DNS hostname but contains a dash in an invalid position", self::INVALID_HOSTNAME => "'%value%' does not match the expected structure for a DNS hostname", self::INVALID_HOSTNAME_SCHEMA => "'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'", self::INVALID_LOCAL_NAME => "'%value%' does not appear to be a valid local network name", self::INVALID_URI => "'%value%' does not appear to be a valid URI hostname", self::IP_ADDRESS_NOT_ALLOWED => "'%value%' appears to be an IP address, but IP addresses are not allowed", self::LOCAL_NAME_NOT_ALLOWED => "'%value%' appears to be a local network name but local network names are not allowed", self::UNDECIPHERABLE_TLD => "'%value%' appears to be a DNS hostname but cannot extract TLD part", self::UNKNOWN_TLD => "'%value%' appears to be a DNS hostname but cannot match TLD against known list")
Validation failure message template definitions
Default valuearray(self::CANNOT_DECODE_PUNYCODE => "'%value%' appears to be a DNS hostname but the given punycode notation cannot be decoded", self::INVALID => "Invalid type given. String expected", self::INVALID_DASH => "'%value%' appears to be a DNS hostname but contains a dash in an invalid position", self::INVALID_HOSTNAME => "'%value%' does not match the expected structure for a DNS hostname", self::INVALID_HOSTNAME_SCHEMA => "'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'", self::INVALID_LOCAL_NAME => "'%value%' does not appear to be a valid local network name", self::INVALID_URI => "'%value%' does not appear to be a valid URI hostname", self::IP_ADDRESS_NOT_ALLOWED => "'%value%' appears to be an IP address, but IP addresses are not allowed", self::LOCAL_NAME_NOT_ALLOWED => "'%value%' appears to be a local network name but local network names are not allowed", self::UNDECIPHERABLE_TLD => "'%value%' appears to be a DNS hostname but cannot extract TLD part", self::UNKNOWN_TLD => "'%value%' appears to be a DNS hostname but cannot match TLD against known list")Details
Type
array
>VPropertyprotectedarray $_messageVariables = array('tld' => '_tld')
Additional variables available for validation failure messages
Default valuearray('tld' => '_tld')Details
Type
array
>VPropertyprotectedarray $_messages = array()
inherited
Array of validation failure messages
Inherited from: \Zend_Validate_Abstract::$$_messages
Default valuearray()Details
Type
array
Inherited_from
\Zend_Validate_Abstract::$$_messages  
>VPropertyprotectedbool $_obscureValue = false
inherited
Flag indidcating whether or not value should be obfuscated in error messages
Inherited from: \Zend_Validate_Abstract::$$_obscureValue
Default valuefalseDetails
Type
bool
Inherited_from
\Zend_Validate_Abstract::$$_obscureValue  
>VPropertyprotected$_options = array('allow' => self::ALLOW_DNS, 'idn' => true, 'tld' => true, 'ip' => null)
Default valuearray('allow' => self::ALLOW_DNS, 'idn' => true, 'tld' => true, 'ip' => null)Details
Type
n/a
>VPropertyprotectedstring $_tld
Details
Type
string
>VPropertyprotected\Zend_Translate $_translator
inherited
Translation object
Inherited from: \Zend_Validate_Abstract::$$_translator
Details
Type
\Zend_Translate
Inherited_from
\Zend_Validate_Abstract::$$_translator  
>VPropertyprotectedBoolean $_translatorDisabled = false
inherited
Is translation disabled?
Inherited from: \Zend_Validate_Abstract::$$_translatorDisabled
Default valuefalseDetails
Type
Boolean
Inherited_from
\Zend_Validate_Abstract::$$_translatorDisabled  
>VPropertyprotectedarray $_validIdns = array('AC' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēėęěĝġģĥħīįĵķĺļľŀłńņňŋőœŕŗřśŝşšţťŧūŭůűųŵŷźżž]{1,63}$/iu'), 'AR' => array(1 => '/^[\x{002d}0-9a-zà-ãç-êìíñ-õü]{1,63}$/iu'), 'AS' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĸĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźż]{1,63}$/iu'), 'AT' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿœšž]{1,63}$/iu'), 'BIZ' => 'Hostname/Biz.php', 'BR' => array(1 => '/^[\x{002d}0-9a-zà-ãçéíó-õúü]{1,63}$/iu'), 'BV' => array(1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'), 'CAT' => array(1 => '/^[\x{002d}0-9a-z·àç-éíïòóúü]{1,63}$/iu'), 'CH' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿœ]{1,63}$/iu'), 'CL' => array(1 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu'), 'CN' => 'Hostname/Cn.php', 'COM' => 'Zend/Validate/Hostname/Com.php', 'DE' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'), 'DK' => array(1 => '/^[\x{002d}0-9a-zäéöüæøå]{1,63}$/iu'), 'ES' => array(1 => '/^[\x{002d}0-9a-zàáçèéíïñòóúü·]{1,63}$/iu'), 'EU' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿ]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-zāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőœŕŗřśŝšťŧũūŭůűųŵŷźżž]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-zșț]{1,63}$/iu', 4 => '/^[\x{002d}0-9a-zΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ]{1,63}$/iu', 5 => '/^[\x{002d}0-9a-zабвгдежзийклмнопрстуфхцчшщъыьэюя]{1,63}$/iu', 6 => '/^[\x{002d}0-9a-zἀ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷῂῃῄῆῇῐ-ΐῖῗῠ-ῧῲῳῴῶῷ]{1,63}$/iu'), 'FI' => array(1 => '/^[\x{002d}0-9a-zäåö]{1,63}$/iu'), 'GR' => array(1 => '/^[\x{002d}0-9a-zΆΈΉΊΌΎ-ΡΣ-ώἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼῂῃῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲῳῴῶ-ῼ]{1,63}$/iu'), 'HK' => 'Zend/Validate/Hostname/Cn.php', 'HU' => array(1 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu'), 'INFO' => array(1 => '/^[\x{002d}0-9a-zäåæéöøü]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-záæéíðóöúýþ]{1,63}$/iu', 4 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu', 5 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu', 6 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', 7 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', 8 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu'), 'IO' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'), 'IS' => array(1 => '/^[\x{002d}0-9a-záéýúíóþæöð]{1,63}$/iu'), 'JP' => 'Zend/Validate/Hostname/Jp.php', 'KR' => array(1 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu'), 'LI' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿœ]{1,63}$/iu'), 'LT' => array(1 => '/^[\x{002d}0-9ąčęėįšųūž]{1,63}$/iu'), 'MD' => array(1 => '/^[\x{002d}0-9ăâîşţ]{1,63}$/iu'), 'MUSEUM' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćċčďđēėęěğġģħīįıķĺļľłńņňŋōőœŕŗřśşšţťŧūůűųŵŷźżžǎǐǒǔ\x{01E5}\x{01E7}\x{01E9}\x{01EF}ə\x{0292}ẁẃẅỳ]{1,63}$/iu'), 'NET' => 'Zend/Validate/Hostname/Com.php', 'NO' => array(1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'), 'NU' => 'Zend/Validate/Hostname/Com.php', 'ORG' => array(1 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-záäåæéëíðóöøúüýþ]{1,63}$/iu', 4 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu', 5 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', 6 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu', 7 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu'), 'PE' => array(1 => '/^[\x{002d}0-9a-zñáéíóúü]{1,63}$/iu'), 'PL' => array(1 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu', 2 => '/^[\x{002d}а-ик-ш\x{0450}ѓѕјљњќџ]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-zâîăşţ]{1,63}$/iu', 4 => '/^[\x{002d}0-9а-яё\x{04C2}]{1,63}$/iu', 5 => '/^[\x{002d}0-9a-zàáâèéêìíîòóôùúûċġħż]{1,63}$/iu', 6 => '/^[\x{002d}0-9a-zàäåæéêòóôöøü]{1,63}$/iu', 7 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', 8 => '/^[\x{002d}0-9a-zàáâãçéêíòóôõúü]{1,63}$/iu', 9 => '/^[\x{002d}0-9a-zâîăşţ]{1,63}$/iu', 10 => '/^[\x{002d}0-9a-záäéíóôúýčďĺľňŕšťž]{1,63}$/iu', 11 => '/^[\x{002d}0-9a-zçë]{1,63}$/iu', 12 => '/^[\x{002d}0-9а-ик-шђјљњћџ]{1,63}$/iu', 13 => '/^[\x{002d}0-9a-zćčđšž]{1,63}$/iu', 14 => '/^[\x{002d}0-9a-zâçöûüğış]{1,63}$/iu', 15 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu', 16 => '/^[\x{002d}0-9a-zäõöüšž]{1,63}$/iu', 17 => '/^[\x{002d}0-9a-zĉĝĥĵŝŭ]{1,63}$/iu', 18 => '/^[\x{002d}0-9a-zâäéëîô]{1,63}$/iu', 19 => '/^[\x{002d}0-9a-zàáâäåæçèéêëìíîïðñòôöøùúûüýćčłńřśš]{1,63}$/iu', 20 => '/^[\x{002d}0-9a-zäåæõöøüšž]{1,63}$/iu', 21 => '/^[\x{002d}0-9a-zàáçèéìíòóùú]{1,63}$/iu', 22 => '/^[\x{002d}0-9a-zàáéíóöúüőű]{1,63}$/iu', 23 => '/^[\x{002d}0-9ΐά-ώ]{1,63}$/iu', 24 => '/^[\x{002d}0-9a-zàáâåæçèéêëðóôöøüþœ]{1,63}$/iu', 25 => '/^[\x{002d}0-9a-záäéíóöúüýčďěňřšťůž]{1,63}$/iu', 26 => '/^[\x{002d}0-9a-z·àçèéíïòóúü]{1,63}$/iu', 27 => '/^[\x{002d}0-9а-ъьюя\x{0450}\x{045D}]{1,63}$/iu', 28 => '/^[\x{002d}0-9а-яёіў]{1,63}$/iu', 29 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', 30 => '/^[\x{002d}0-9a-záäåæéëíðóöøúüýþ]{1,63}$/iu', 31 => '/^[\x{002d}0-9a-zàâæçèéêëîïñôùûüÿœ]{1,63}$/iu', 32 => '/^[\x{002d}0-9а-щъыьэюяёєіїґ]{1,63}$/iu', 33 => '/^[\x{002d}0-9א-ת]{1,63}$/iu'), 'PR' => array(1 => '/^[\x{002d}0-9a-záéíóúñäëïüöâêîôûàèùæçœãõ]{1,63}$/iu'), 'PT' => array(1 => '/^[\x{002d}0-9a-záàâãçéêíóôõú]{1,63}$/iu'), 'RU' => array(1 => '/^[\x{002d}0-9а-яё]{1,63}$/iu'), 'SA' => array(1 => '/^[\x{002d}.0-9\x{0621}-\x{063A}\x{0641}-\x{064A}\x{0660}-\x{0669}]{1,63}$/iu'), 'SE' => array(1 => '/^[\x{002d}0-9a-zäåéöü]{1,63}$/iu'), 'SH' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'), 'SI' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿ]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-zāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőœŕŗřśŝšťŧũūŭůűųŵŷźżž]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-zșț]{1,63}$/iu'), 'SJ' => array(1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'), 'TH' => array(1 => '/^[\x{002d}0-9a-z\x{0E01}-\x{0E3A}\x{0E40}-\x{0E4D}\x{0E50}-\x{0E59}]{1,63}$/iu'), 'TM' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēėęěĝġģĥħīįĵķĺļľŀłńņňŋőœŕŗřśŝşšţťŧūŭůűųŵŷźżž]{1,63}$/iu'), 'TW' => 'Zend/Validate/Hostname/Cn.php', 'TR' => array(1 => '/^[\x{002d}0-9a-zğıüşöç]{1,63}$/iu'), 'VE' => array(1 => '/^[\x{002d}0-9a-záéíóúüñ]{1,63}$/iu'), 'VN' => array(1 => '/^[ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚÝàáâãèéêìíòóôõùúýĂăĐđĨĩŨũƠơƯư\x{1EA0}-\x{1EF9}]{1,63}$/iu'), 'ایران' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), '中国' => 'Zend/Validate/Hostname/Cn.php', '公司' => 'Zend/Validate/Hostname/Cn.php', '网络' => 'Zend/Validate/Hostname/Cn.php')
Array for valid Idns
Default valuearray('AC' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēėęěĝġģĥħīįĵķĺļľŀłńņňŋőœŕŗřśŝşšţťŧūŭůűųŵŷźżž]{1,63}$/iu'), 'AR' => array(1 => '/^[\x{002d}0-9a-zà-ãç-êìíñ-õü]{1,63}$/iu'), 'AS' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĸĺļľłńņňŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźż]{1,63}$/iu'), 'AT' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿœšž]{1,63}$/iu'), 'BIZ' => 'Hostname/Biz.php', 'BR' => array(1 => '/^[\x{002d}0-9a-zà-ãçéíó-õúü]{1,63}$/iu'), 'BV' => array(1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'), 'CAT' => array(1 => '/^[\x{002d}0-9a-z·àç-éíïòóúü]{1,63}$/iu'), 'CH' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿœ]{1,63}$/iu'), 'CL' => array(1 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu'), 'CN' => 'Hostname/Cn.php', 'COM' => 'Zend/Validate/Hostname/Com.php', 'DE' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'), 'DK' => array(1 => '/^[\x{002d}0-9a-zäéöüæøå]{1,63}$/iu'), 'ES' => array(1 => '/^[\x{002d}0-9a-zàáçèéíïñòóúü·]{1,63}$/iu'), 'EU' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿ]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-zāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőœŕŗřśŝšťŧũūŭůűųŵŷźżž]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-zșț]{1,63}$/iu', 4 => '/^[\x{002d}0-9a-zΐάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ]{1,63}$/iu', 5 => '/^[\x{002d}0-9a-zабвгдежзийклмнопрстуфхцчшщъыьэюя]{1,63}$/iu', 6 => '/^[\x{002d}0-9a-zἀ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷῂῃῄῆῇῐ-ΐῖῗῠ-ῧῲῳῴῶῷ]{1,63}$/iu'), 'FI' => array(1 => '/^[\x{002d}0-9a-zäåö]{1,63}$/iu'), 'GR' => array(1 => '/^[\x{002d}0-9a-zΆΈΉΊΌΎ-ΡΣ-ώἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼῂῃῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲῳῴῶ-ῼ]{1,63}$/iu'), 'HK' => 'Zend/Validate/Hostname/Cn.php', 'HU' => array(1 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu'), 'INFO' => array(1 => '/^[\x{002d}0-9a-zäåæéöøü]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-záæéíðóöúýþ]{1,63}$/iu', 4 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu', 5 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu', 6 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', 7 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', 8 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu'), 'IO' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'), 'IS' => array(1 => '/^[\x{002d}0-9a-záéýúíóþæöð]{1,63}$/iu'), 'JP' => 'Zend/Validate/Hostname/Jp.php', 'KR' => array(1 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu'), 'LI' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿœ]{1,63}$/iu'), 'LT' => array(1 => '/^[\x{002d}0-9ąčęėįšųūž]{1,63}$/iu'), 'MD' => array(1 => '/^[\x{002d}0-9ăâîşţ]{1,63}$/iu'), 'MUSEUM' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćċčďđēėęěğġģħīįıķĺļľłńņňŋōőœŕŗřśşšţťŧūůűųŵŷźżžǎǐǒǔ\x{01E5}\x{01E7}\x{01E9}\x{01EF}ə\x{0292}ẁẃẅỳ]{1,63}$/iu'), 'NET' => 'Zend/Validate/Hostname/Com.php', 'NO' => array(1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'), 'NU' => 'Zend/Validate/Hostname/Com.php', 'ORG' => array(1 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-záäåæéëíðóöøúüýþ]{1,63}$/iu', 4 => '/^[\x{002d}0-9a-záéíóöúüőű]{1,63}$/iu', 5 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', 6 => '/^[\x{AC00}-\x{D7A3}]{1,17}$/iu', 7 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu'), 'PE' => array(1 => '/^[\x{002d}0-9a-zñáéíóúü]{1,63}$/iu'), 'PL' => array(1 => '/^[\x{002d}0-9a-zāčēģīķļņōŗšūž]{1,63}$/iu', 2 => '/^[\x{002d}а-ик-ш\x{0450}ѓѕјљњќџ]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-zâîăşţ]{1,63}$/iu', 4 => '/^[\x{002d}0-9а-яё\x{04C2}]{1,63}$/iu', 5 => '/^[\x{002d}0-9a-zàáâèéêìíîòóôùúûċġħż]{1,63}$/iu', 6 => '/^[\x{002d}0-9a-zàäåæéêòóôöøü]{1,63}$/iu', 7 => '/^[\x{002d}0-9a-zóąćęłńśźż]{1,63}$/iu', 8 => '/^[\x{002d}0-9a-zàáâãçéêíòóôõúü]{1,63}$/iu', 9 => '/^[\x{002d}0-9a-zâîăşţ]{1,63}$/iu', 10 => '/^[\x{002d}0-9a-záäéíóôúýčďĺľňŕšťž]{1,63}$/iu', 11 => '/^[\x{002d}0-9a-zçë]{1,63}$/iu', 12 => '/^[\x{002d}0-9а-ик-шђјљњћџ]{1,63}$/iu', 13 => '/^[\x{002d}0-9a-zćčđšž]{1,63}$/iu', 14 => '/^[\x{002d}0-9a-zâçöûüğış]{1,63}$/iu', 15 => '/^[\x{002d}0-9a-záéíñóúü]{1,63}$/iu', 16 => '/^[\x{002d}0-9a-zäõöüšž]{1,63}$/iu', 17 => '/^[\x{002d}0-9a-zĉĝĥĵŝŭ]{1,63}$/iu', 18 => '/^[\x{002d}0-9a-zâäéëîô]{1,63}$/iu', 19 => '/^[\x{002d}0-9a-zàáâäåæçèéêëìíîïðñòôöøùúûüýćčłńřśš]{1,63}$/iu', 20 => '/^[\x{002d}0-9a-zäåæõöøüšž]{1,63}$/iu', 21 => '/^[\x{002d}0-9a-zàáçèéìíòóùú]{1,63}$/iu', 22 => '/^[\x{002d}0-9a-zàáéíóöúüőű]{1,63}$/iu', 23 => '/^[\x{002d}0-9ΐά-ώ]{1,63}$/iu', 24 => '/^[\x{002d}0-9a-zàáâåæçèéêëðóôöøüþœ]{1,63}$/iu', 25 => '/^[\x{002d}0-9a-záäéíóöúüýčďěňřšťůž]{1,63}$/iu', 26 => '/^[\x{002d}0-9a-z·àçèéíïòóúü]{1,63}$/iu', 27 => '/^[\x{002d}0-9а-ъьюя\x{0450}\x{045D}]{1,63}$/iu', 28 => '/^[\x{002d}0-9а-яёіў]{1,63}$/iu', 29 => '/^[\x{002d}0-9a-ząčėęįšūųž]{1,63}$/iu', 30 => '/^[\x{002d}0-9a-záäåæéëíðóöøúüýþ]{1,63}$/iu', 31 => '/^[\x{002d}0-9a-zàâæçèéêëîïñôùûüÿœ]{1,63}$/iu', 32 => '/^[\x{002d}0-9а-щъыьэюяёєіїґ]{1,63}$/iu', 33 => '/^[\x{002d}0-9א-ת]{1,63}$/iu'), 'PR' => array(1 => '/^[\x{002d}0-9a-záéíóúñäëïüöâêîôûàèùæçœãõ]{1,63}$/iu'), 'PT' => array(1 => '/^[\x{002d}0-9a-záàâãçéêíóôõú]{1,63}$/iu'), 'RU' => array(1 => '/^[\x{002d}0-9а-яё]{1,63}$/iu'), 'SA' => array(1 => '/^[\x{002d}.0-9\x{0621}-\x{063A}\x{0641}-\x{064A}\x{0660}-\x{0669}]{1,63}$/iu'), 'SE' => array(1 => '/^[\x{002d}0-9a-zäåéöü]{1,63}$/iu'), 'SH' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿăąāćĉčċďđĕěėęēğĝġģĥħĭĩįīıĵķĺľļłńňņŋŏőōœĸŕřŗśŝšşťţŧŭůűũųūŵŷźžż]{1,63}$/iu'), 'SI' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿ]{1,63}$/iu', 2 => '/^[\x{002d}0-9a-zāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıĵķĺļľŀłńņňʼnŋōŏőœŕŗřśŝšťŧũūŭůűųŵŷźżž]{1,63}$/iu', 3 => '/^[\x{002d}0-9a-zșț]{1,63}$/iu'), 'SJ' => array(1 => '/^[\x{002d}0-9a-zàáä-éêñ-ôöøüčđńŋšŧž]{1,63}$/iu'), 'TH' => array(1 => '/^[\x{002d}0-9a-z\x{0E01}-\x{0E3A}\x{0E40}-\x{0E4D}\x{0E50}-\x{0E59}]{1,63}$/iu'), 'TM' => array(1 => '/^[\x{002d}0-9a-zà-öø-ÿāăąćĉċčďđēėęěĝġģĥħīįĵķĺļľŀłńņňŋőœŕŗřśŝşšţťŧūŭůűųŵŷźżž]{1,63}$/iu'), 'TW' => 'Zend/Validate/Hostname/Cn.php', 'TR' => array(1 => '/^[\x{002d}0-9a-zğıüşöç]{1,63}$/iu'), 'VE' => array(1 => '/^[\x{002d}0-9a-záéíóúüñ]{1,63}$/iu'), 'VN' => array(1 => '/^[ÀÁÂÃÈÉÊÌÍÒÓÔÕÙÚÝàáâãèéêìíòóôõùúýĂăĐđĨĩŨũƠơƯư\x{1EA0}-\x{1EF9}]{1,63}$/iu'), 'ایران' => array(1 => '/^[\x{0621}-\x{0624}\x{0626}-\x{063A}\x{0641}\x{0642}\x{0644}-\x{0648}\x{067E}\x{0686}\x{0698}\x{06A9}\x{06AF}\x{06CC}\x{06F0}-\x{06F9}]{1,30}$/iu'), '中国' => 'Zend/Validate/Hostname/Cn.php', '公司' => 'Zend/Validate/Hostname/Cn.php', '网络' => 'Zend/Validate/Hostname/Cn.php')Details
Type
array
See
Official list of supported IDN Chars (.AC) Ascension Island http://www.nic.ac/pdf/AC-IDN-Policy.pdf (.AR) Argentinia http://www.nic.ar/faqidn.html (.AS) American Samoa http://www.nic.as/idn/chars.cfm (.AT) Austria http://www.nic.at/en/service/technical_information/idn/charset_converter/ (.BIZ) International http://www.iana.org/domains/idn-tables/ (.BR) Brazil http://registro.br/faq/faq6.html (.BV) Bouvett Island http://www.norid.no/domeneregistrering/idn/idn_nyetegn.en.html (.CAT) Catalan http://www.iana.org/domains/idn-tables/tables/cat_ca_1.0.html (.CH) Switzerland https://nic.switch.ch/reg/ocView.action?res=EF6GW2JBPVTG67DLNIQXU234MN6SC33JNQQGI7L6#anhang1 (.CL) Chile http://www.iana.org/domains/idn-tables/tables/cl_latn_1.0.html (.COM) International http://www.verisign.com/information-services/naming-services/internationalized-domain-names/index.html (.DE) Germany http://www.denic.de/en/domains/idns/liste.html (.DK) Danmark http://www.dk-hostmaster.dk/index.php?id=151 (.ES) Spain https://www.nic.es/media/2008-05/1210147705287.pdf (.FI) Finland http://www.ficora.fi/en/index/palvelut/fiverkkotunnukset/aakkostenkaytto.html (.GR) Greece https://grweb.ics.forth.gr/CharacterTable1_en.jsp (.HU) Hungary http://www.domain.hu/domain/English/szabalyzat/szabalyzat.html (.INFO) International http://www.nic.info/info/idn (.IO) British Indian Ocean Territory http://www.nic.io/IO-IDN-Policy.pdf (.IR) Iran http://www.nic.ir/Allowable_Characters_dot-iran (.IS) Iceland http://www.isnic.is/domain/rules.php (.KR) Korea http://www.iana.org/domains/idn-tables/tables/kr_ko-kr_1.0.html (.LI) Liechtenstein https://nic.switch.ch/reg/ocView.action?res=EF6GW2JBPVTG67DLNIQXU234MN6SC33JNQQGI7L6#anhang1 (.LT) Lithuania http://www.domreg.lt/static/doc/public/idn_symbols-en.pdf (.MD) Moldova http://www.register.md/ (.MUSEUM) International http://www.iana.org/domains/idn-tables/tables/museum_latn_1.0.html (.NET) International http://www.verisign.com/information-services/naming-services/internationalized-domain-names/index.html (.NO) Norway http://www.norid.no/domeneregistrering/idn/idn_nyetegn.en.html (.NU) Niue http://www.worldnames.net/ (.ORG) International http://www.pir.org/index.php?db=content/FAQs&tbl=FAQs_Registrant&id=2 (.PE) Peru https://www.nic.pe/nuevas_politicas_faq_2.php (.PL) Poland http://www.dns.pl/IDN/allowed_character_sets.pdf (.PR) Puerto Rico http://www.nic.pr/idn_rules.asp (.PT) Portugal https://online.dns.pt/dns_2008/do?com=DS;8216320233;111;+PAGE(4000058)+K-CAT-CODIGO(C.125)+RCNT(100); (.RU) Russia http://www.iana.org/domains/idn-tables/tables/ru_ru-ru_1.0.html (.SA) Saudi Arabia http://www.iana.org/domains/idn-tables/tables/sa_ar_1.0.html (.SE) Sweden http://www.iis.se/english/IDN_campaignsite.shtml?lang=en (.SH) Saint Helena http://www.nic.sh/SH-IDN-Policy.pdf (.SJ) Svalbard and Jan Mayen http://www.norid.no/domeneregistrering/idn/idn_nyetegn.en.html (.TH) Thailand http://www.iana.org/domains/idn-tables/tables/th_th-th_1.0.html (.TM) Turkmenistan http://www.nic.tm/TM-IDN-Policy.pdf (.TR) Turkey https://www.nic.tr/index.php (.VE) Venice http://www.iana.org/domains/idn-tables/tables/ve_es_1.0.html (.VN) Vietnam http://www.vnnic.vn/english/5-6-300-2-2-04-20071115.htm#1.%20Introduction  
>VPropertyprotectedarray $_validTlds = array('ac', 'ad', 'ae', 'aero', 'af', 'ag', 'ai', 'al', 'am', 'an', 'ao', 'aq', 'ar', 'arpa', 'as', 'asia', 'at', 'au', 'aw', 'ax', 'az', 'ba', 'bb', 'bd', 'be', 'bf', 'bg', 'bh', 'bi', 'biz', 'bj', 'bm', 'bn', 'bo', 'br', 'bs', 'bt', 'bv', 'bw', 'by', 'bz', 'ca', 'cat', 'cc', 'cd', 'cf', 'cg', 'ch', 'ci', 'ck', 'cl', 'cm', 'cn', 'co', 'com', 'coop', 'cr', 'cu', 'cv', 'cx', 'cy', 'cz', 'de', 'dj', 'dk', 'dm', 'do', 'dz', 'ec', 'edu', 'ee', 'eg', 'er', 'es', 'et', 'eu', 'fi', 'fj', 'fk', 'fm', 'fo', 'fr', 'ga', 'gb', 'gd', 'ge', 'gf', 'gg', 'gh', 'gi', 'gl', 'gm', 'gn', 'gov', 'gp', 'gq', 'gr', 'gs', 'gt', 'gu', 'gw', 'gy', 'hk', 'hm', 'hn', 'hr', 'ht', 'hu', 'id', 'ie', 'il', 'im', 'in', 'info', 'int', 'io', 'iq', 'ir', 'is', 'it', 'je', 'jm', 'jo', 'jobs', 'jp', 'ke', 'kg', 'kh', 'ki', 'km', 'kn', 'kp', 'kr', 'kw', 'ky', 'kz', 'la', 'lb', 'lc', 'li', 'lk', 'lr', 'ls', 'lt', 'lu', 'lv', 'ly', 'ma', 'mc', 'md', 'me', 'mg', 'mh', 'mil', 'mk', 'ml', 'mm', 'mn', 'mo', 'mobi', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'museum', 'mv', 'mw', 'mx', 'my', 'mz', 'na', 'name', 'nc', 'ne', 'net', 'nf', 'ng', 'ni', 'nl', 'no', 'np', 'nr', 'nu', 'nz', 'om', 'org', 'pa', 'pe', 'pf', 'pg', 'ph', 'pk', 'pl', 'pm', 'pn', 'pr', 'pro', 'ps', 'pt', 'pw', 'py', 'qa', 're', 'ro', 'rs', 'ru', 'rw', 'sa', 'sb', 'sc', 'sd', 'se', 'sg', 'sh', 'si', 'sj', 'sk', 'sl', 'sm', 'sn', 'so', 'sr', 'st', 'su', 'sv', 'sy', 'sz', 'tc', 'td', 'tel', 'tf', 'tg', 'th', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'tp', 'tr', 'travel', 'tt', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'um', 'us', 'uy', 'uz', 'va', 'vc', 've', 'vg', 'vi', 'vn', 'vu', 'wf', 'ws', 'xxx', 'ye', 'yt', 'yu', 'za', 'zm', 'zw')
Array of valid top-level-domains
Default valuearray('ac', 'ad', 'ae', 'aero', 'af', 'ag', 'ai', 'al', 'am', 'an', 'ao', 'aq', 'ar', 'arpa', 'as', 'asia', 'at', 'au', 'aw', 'ax', 'az', 'ba', 'bb', 'bd', 'be', 'bf', 'bg', 'bh', 'bi', 'biz', 'bj', 'bm', 'bn', 'bo', 'br', 'bs', 'bt', 'bv', 'bw', 'by', 'bz', 'ca', 'cat', 'cc', 'cd', 'cf', 'cg', 'ch', 'ci', 'ck', 'cl', 'cm', 'cn', 'co', 'com', 'coop', 'cr', 'cu', 'cv', 'cx', 'cy', 'cz', 'de', 'dj', 'dk', 'dm', 'do', 'dz', 'ec', 'edu', 'ee', 'eg', 'er', 'es', 'et', 'eu', 'fi', 'fj', 'fk', 'fm', 'fo', 'fr', 'ga', 'gb', 'gd', 'ge', 'gf', 'gg', 'gh', 'gi', 'gl', 'gm', 'gn', 'gov', 'gp', 'gq', 'gr', 'gs', 'gt', 'gu', 'gw', 'gy', 'hk', 'hm', 'hn', 'hr', 'ht', 'hu', 'id', 'ie', 'il', 'im', 'in', 'info', 'int', 'io', 'iq', 'ir', 'is', 'it', 'je', 'jm', 'jo', 'jobs', 'jp', 'ke', 'kg', 'kh', 'ki', 'km', 'kn', 'kp', 'kr', 'kw', 'ky', 'kz', 'la', 'lb', 'lc', 'li', 'lk', 'lr', 'ls', 'lt', 'lu', 'lv', 'ly', 'ma', 'mc', 'md', 'me', 'mg', 'mh', 'mil', 'mk', 'ml', 'mm', 'mn', 'mo', 'mobi', 'mp', 'mq', 'mr', 'ms', 'mt', 'mu', 'museum', 'mv', 'mw', 'mx', 'my', 'mz', 'na', 'name', 'nc', 'ne', 'net', 'nf', 'ng', 'ni', 'nl', 'no', 'np', 'nr', 'nu', 'nz', 'om', 'org', 'pa', 'pe', 'pf', 'pg', 'ph', 'pk', 'pl', 'pm', 'pn', 'pr', 'pro', 'ps', 'pt', 'pw', 'py', 'qa', 're', 'ro', 'rs', 'ru', 'rw', 'sa', 'sb', 'sc', 'sd', 'se', 'sg', 'sh', 'si', 'sj', 'sk', 'sl', 'sm', 'sn', 'so', 'sr', 'st', 'su', 'sv', 'sy', 'sz', 'tc', 'td', 'tel', 'tf', 'tg', 'th', 'tj', 'tk', 'tl', 'tm', 'tn', 'to', 'tp', 'tr', 'travel', 'tt', 'tv', 'tw', 'tz', 'ua', 'ug', 'uk', 'um', 'us', 'uy', 'uz', 'va', 'vc', 've', 'vg', 'vi', 'vn', 'vu', 'wf', 'ws', 'xxx', 'ye', 'yt', 'yu', 'za', 'zm', 'zw')Details
Type
array
See
List of all TLDs by domain  
See
Official list of supported TLDs  
>VPropertyprotectedmixed $_value
inherited
The value to be validated
Inherited from: \Zend_Validate_Abstract::$$_value
Details
Type
mixed
Inherited_from
\Zend_Validate_Abstract::$$_value  

Methods

methodpublic__construct( $options = array()) : void

Sets validator options

Parameters
NameTypeDescription
$options
Details
See
Technical Specifications for ccTLDs  
methodpublic__get(string $property) : mixed
inherited

Magic function returns the value of the requested property, if and only if it is the value or a message variable.

Inherited from: \Zend_Validate_Abstract::__get()
Parameters
NameTypeDescription
$propertystring
Returns
TypeDescription
mixed
Throws
ExceptionDescription
\Zend_Validate_Exception
methodprotected_createMessage(string $messageKey, string $value) : string
inherited

Constructs and returns a validation failure message with the given message key and value.

Inherited from: \Zend_Validate_Abstract::_createMessage()

Returns null if and only if $messageKey does not correspond to an existing template.

If a translator is available and a translation exists for $messageKey, the translation will be used.

Parameters
NameTypeDescription
$messageKeystring
$valuestring
Returns
TypeDescription
string
methodprotected_error(string $messageKey, string $value = null) : void
inherited

Inherited from: \Zend_Validate_Abstract::_error()
Parameters
NameTypeDescription
$messageKeystring
$valuestring

OPTIONAL

methodprotected_setValue(mixed $value) : void
inherited

Sets the value to be validated and clears the messages and errors arrays

Inherited from: \Zend_Validate_Abstract::_setValue()
Parameters
NameTypeDescription
$valuemixed
methodprotecteddecodePunycode(string $encoded) : string

Decodes a punycode encoded string to it's original utf8 string In case of a decoding failure the original string is returned

Parameters
NameTypeDescription
$encodedstring

Punycode encoded string to decode

Returns
TypeDescription
string
methodpublicgetAllow() : integer

Returns the allow option

Returns
TypeDescription
integer
methodpublicgetDefaultTranslator() : \Zend_Translate_Adapter | null
staticinherited

Get default translation object for all validate objects

Inherited from: \Zend_Validate_Abstract::getDefaultTranslator()
Returns
TypeDescription
\Zend_Translate_Adapter | null
methodpublicgetErrors() : array
inherited

Returns array of validation failure message codes

Inherited from: \Zend_Validate_Abstract::getErrors()
Returns
TypeDescription
array
methodpublicgetIpValidator() : \Zend_Validate_Ip

Returns the set ip validator

Returns
TypeDescription
\Zend_Validate_Ip
methodpublicgetMessageLength() : integer
staticinherited

Returns the maximum allowed message length

Inherited from: \Zend_Validate_Abstract::getMessageLength()
Returns
TypeDescription
integer
methodpublicgetMessageTemplates() : array
inherited

Returns the message templates from the validator

Inherited from: \Zend_Validate_Abstract::getMessageTemplates()
Returns
TypeDescription
array
methodpublicgetMessageVariables() : array
inherited

Returns an array of the names of variables that are used in constructing validation failure messages

Inherited from: \Zend_Validate_Abstract::getMessageVariables()
Returns
TypeDescription
array
methodpublicgetMessages() : array
inherited

Returns array of validation failure messages

Inherited from: \Zend_Validate_Abstract::getMessages()

The array keys are validation failure message identifiers, and the array values are the corresponding human-readable message strings.

If isValid() was never called or if the most recent isValid() call returned true, then this method returns an empty array.

Returns
TypeDescription
array
methodpublicgetObscureValue() : bool
inherited

Retrieve flag indicating whether or not value should be obfuscated in messages

Inherited from: \Zend_Validate_Abstract::getObscureValue()
Returns
TypeDescription
bool
methodpublicgetOptions() : array

Returns all set options

Returns
TypeDescription
array
methodpublicgetTranslator() : \Zend_Translate_Adapter | null
inherited

Return translation object

Inherited from: \Zend_Validate_Abstract::getTranslator()
Returns
TypeDescription
\Zend_Translate_Adapter | null
methodpublicgetValidateIdn() : boolean

Returns the set idn option

Returns
TypeDescription
boolean
methodpublicgetValidateTld() : boolean

Returns the set tld option

Returns
TypeDescription
boolean
methodpublichasDefaultTranslator() : boolean
staticinherited

Is there a default translation object set?

Inherited from: \Zend_Validate_Abstract::hasDefaultTranslator()
Returns
TypeDescription
boolean
methodpublichasTranslator() : bool
inherited

Does this validator have its own specific translator?

Inherited from: \Zend_Validate_Abstract::hasTranslator()
Returns
TypeDescription
bool
methodpublicisValid(string $value) : boolean

Defined by Zend_Validate_Interface

Returns true if and only if the $value is a valid hostname with respect to the current allow option

Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
boolean
Throws
ExceptionDescription
\Zend_Validate_Exceptionif a fatal error occurs for validation process
methodpublicsetAllow(integer $allow) : \Zend_Validate_Hostname

Sets the allow option

Parameters
NameTypeDescription
$allowinteger
Returns
TypeDescription
\Zend_Validate_HostnameProvides a fluent interface
methodpublicsetDefaultTranslator(\Zend_Translate | \Zend_Translate_Adapter | null $translator = null) : void
staticinherited

Set default translation object for all validate objects

Inherited from: \Zend_Validate_Abstract::setDefaultTranslator()
Parameters
NameTypeDescription
$translator\Zend_Translate | \Zend_Translate_Adapter | null
methodpublicsetDisableTranslator(bool $flag) : \Zend_Validate_Abstract
inherited

Indicate whether or not translation should be disabled

Inherited from: \Zend_Validate_Abstract::setDisableTranslator()
Parameters
NameTypeDescription
$flagbool
Returns
TypeDescription
\Zend_Validate_Abstract
methodpublicsetIpValidator(\Zend_Validate_Ip $ipValidator = null) : \void;

Parameters
NameTypeDescription
$ipValidator\Zend_Validate_Ip

OPTIONAL

Returns
TypeDescription
\void;
methodpublicsetMessage(string $messageString, string $messageKey = null) : \Zend_Validate_Abstract
inherited

Sets the validation failure message template for a particular key

Inherited from: \Zend_Validate_Abstract::setMessage()
Parameters
NameTypeDescription
$messageStringstring
$messageKeystring

OPTIONAL

Returns
TypeDescription
\Zend_Validate_AbstractProvides a fluent interface
Throws
ExceptionDescription
\Zend_Validate_Exception
methodpublicsetMessageLength(integer $length = -1) : void
staticinherited

Sets the maximum allowed message length

Inherited from: \Zend_Validate_Abstract::setMessageLength()
Parameters
NameTypeDescription
$lengthinteger
methodpublicsetMessages(array $messages) : \Zend_Validate_Abstract
inherited

Sets validation failure message templates given as an array, where the array keys are the message keys, and the array values are the message template strings.

Inherited from: \Zend_Validate_Abstract::setMessages()
Parameters
NameTypeDescription
$messagesarray
Returns
TypeDescription
\Zend_Validate_Abstract
methodpublicsetObscureValue(bool $flag) : \Zend_Validate_Abstract
inherited

Set flag indicating whether or not value should be obfuscated in messages

Inherited from: \Zend_Validate_Abstract::setObscureValue()
Parameters
NameTypeDescription
$flagbool
Returns
TypeDescription
\Zend_Validate_Abstract
methodpublicsetOptions(array $options) : \Zend_Validate_Hostname

Sets the options for this validator

Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
\Zend_Validate_Hostname
methodpublicsetTranslator(\Zend_Translate | \Zend_Translate_Adapter | null $translator = null) : \Zend_Validate_Abstract
inherited

Set translation object

Inherited from: \Zend_Validate_Abstract::setTranslator()
Parameters
NameTypeDescription
$translator\Zend_Translate | \Zend_Translate_Adapter | null
Returns
TypeDescription
\Zend_Validate_Abstract
methodpublicsetValidateIdn(boolean $allowed) : void

Set whether IDN domains are validated

This only applies when DNS hostnames are validated

Parameters
NameTypeDescription
$allowedboolean

Set allowed to true to validate IDNs, and false to not validate them

methodpublicsetValidateTld(boolean $allowed) : void

Set whether the TLD element of a hostname is validated

This only applies when DNS hostnames are validated

Parameters
NameTypeDescription
$allowedboolean

Set allowed to true to validate TLDs, and false to not validate them

methodpublictranslatorIsDisabled() : bool
inherited

Is translation disabled?

Inherited from: \Zend_Validate_Abstract::translatorIsDisabled()
Returns
TypeDescription
bool
Documentation was generated by phpDocumentor 2.0.0a12.