Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields | Protected Member Functions | Protected Attributes
Zend_Validate_Hostname Class Reference
Inheritance diagram for Zend_Validate_Hostname:
Zend_Validate_Abstract Zend_Validate_Interface

Public Member Functions

 __construct ($options=array())
 
 getOptions ()
 
 setOptions ($options)
 
 getIpValidator ()
 
 setIpValidator (Zend_Validate_Ip $ipValidator=null)
 
 getAllow ()
 
 setAllow ($allow)
 
 getValidateIdn ()
 
 setValidateIdn ($allowed)
 
 getValidateTld ()
 
 setValidateTld ($allowed)
 
 isValid ($value)
 
- Public Member Functions inherited from Zend_Validate_Abstract
 getMessages ()
 
 getMessageVariables ()
 
 getMessageTemplates ()
 
 setMessage ($messageString, $messageKey=null)
 
 setMessages (array $messages)
 
 __get ($property)
 
 getErrors ()
 
 setObscureValue ($flag)
 
 getObscureValue ()
 
 setTranslator ($translator=null)
 
 getTranslator ()
 
 hasTranslator ()
 
 setDisableTranslator ($flag)
 
 translatorIsDisabled ()
 

Data Fields

const CANNOT_DECODE_PUNYCODE = 'hostnameCannotDecodePunycode'
 
const INVALID = 'hostnameInvalid'
 
const INVALID_DASH = 'hostnameDashCharacter'
 
const INVALID_HOSTNAME = 'hostnameInvalidHostname'
 
const INVALID_HOSTNAME_SCHEMA = 'hostnameInvalidHostnameSchema'
 
const INVALID_LOCAL_NAME = 'hostnameInvalidLocalName'
 
const INVALID_URI = 'hostnameInvalidUri'
 
const IP_ADDRESS_NOT_ALLOWED = 'hostnameIpAddressNotAllowed'
 
const LOCAL_NAME_NOT_ALLOWED = 'hostnameLocalNameNotAllowed'
 
const UNDECIPHERABLE_TLD = 'hostnameUndecipherableTld'
 
const UNKNOWN_TLD = 'hostnameUnknownTld'
 
const ALLOW_DNS = 1
 
const ALLOW_IP = 2
 
const ALLOW_LOCAL = 4
 
const ALLOW_URI = 8
 
const ALLOW_ALL = 15
 

Protected Member Functions

 decodePunycode ($encoded)
 
- Protected Member Functions inherited from Zend_Validate_Abstract
 _createMessage ($messageKey, $value)
 
 _implodeRecursive (array $pieces)
 
 _error ($messageKey, $value=null)
 
 _setValue ($value)
 

Protected Attributes

 $_messageTemplates
 
 $_messageVariables
 
 $_validTlds
 
 $_tld
 
 $_validIdns
 
 $_idnLength
 
 $_options
 
- Protected Attributes inherited from Zend_Validate_Abstract
 $_value
 
 $_messageVariables = array()
 
 $_messageTemplates = array()
 
 $_messages = array()
 
 $_obscureValue = false
 
 $_errors = array()
 
 $_translator
 
 $_translatorDisabled = false
 

Additional Inherited Members

- Static Public Member Functions inherited from Zend_Validate_Abstract
static setDefaultTranslator ($translator=null)
 
static getDefaultTranslator ()
 
static hasDefaultTranslator ()
 
static getMessageLength ()
 
static setMessageLength ($length=-1)
 
- Static Protected Attributes inherited from Zend_Validate_Abstract
static $_defaultTranslator
 
static $_messageLength = -1
 

Detailed Description

Definition at line 47 of file Hostname.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $options = array())

Sets validator options

See also
http://www.iana.org/cctld/specifications-policies-cctlds-01apr02.htm Technical Specifications for ccTLDs
Parameters
array$optionsValidator options

Definition at line 1520 of file Hostname.php.

1521  {
1522  if ($options instanceof Zend_Config) {
1523  $options = $options->toArray();
1524  } else if (!is_array($options)) {
1525  $options = func_get_args();
1526  $temp['allow'] = array_shift($options);
1527  if (!empty($options)) {
1528  $temp['idn'] = array_shift($options);
1529  }
1530 
1531  if (!empty($options)) {
1532  $temp['tld'] = array_shift($options);
1533  }
1534 
1535  if (!empty($options)) {
1536  $temp['ip'] = array_shift($options);
1537  }
1538 
1539  $options = $temp;
1540  }
1541 
1543  $this->setOptions($options);
1544  }

Member Function Documentation

◆ decodePunycode()

decodePunycode (   $encoded)
protected

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

Parameters
string$encodedPunycode encoded string to decode
Returns
string

Definition at line 1903 of file Hostname.php.

1904  {
1905  if (!preg_match('/^[a-z0-9-]+$/i', $encoded)) {
1906  // no punycode encoded string
1907  $this->_error(self::CANNOT_DECODE_PUNYCODE);
1908  return false;
1909  }
1910 
1911  $decoded = array();
1912  $separator = strrpos($encoded, '-');
1913  if ($separator > 0) {
1914  for ($x = 0; $x < $separator; ++$x) {
1915  // prepare decoding matrix
1916  $decoded[] = ord($encoded[$x]);
1917  }
1918  }
1919 
1920  $lengthd = count($decoded);
1921  $lengthe = strlen($encoded);
1922 
1923  // decoding
1924  $init = true;
1925  $base = 72;
1926  $index = 0;
1927  $char = 0x80;
1928 
1929  for ($indexe = ($separator) ? ($separator + 1) : 0; $indexe < $lengthe; ++$lengthd) {
1930  for ($old_index = $index, $pos = 1, $key = 36; 1 ; $key += 36) {
1931  $hex = ord($encoded[$indexe++]);
1932  $digit = ($hex - 48 < 10) ? $hex - 22
1933  : (($hex - 65 < 26) ? $hex - 65
1934  : (($hex - 97 < 26) ? $hex - 97
1935  : 36));
1936 
1937  $index += $digit * $pos;
1938  $tag = ($key <= $base) ? 1 : (($key >= $base + 26) ? 26 : ($key - $base));
1939  if ($digit < $tag) {
1940  break;
1941  }
1942 
1943  $pos = (int) ($pos * (36 - $tag));
1944  }
1945 
1946  $delta = intval($init ? (($index - $old_index) / 700) : (($index - $old_index) / 2));
1947  $delta += intval($delta / ($lengthd + 1));
1948  for ($key = 0; $delta > 910 / 2; $key += 36) {
1949  $delta = intval($delta / 35);
1950  }
1951 
1952  $base = intval($key + 36 * $delta / ($delta + 38));
1953  $init = false;
1954  $char += (int) ($index / ($lengthd + 1));
1955  $index %= ($lengthd + 1);
1956  if ($lengthd > 0) {
1957  for ($i = $lengthd; $i > $index; $i--) {
1958  $decoded[$i] = $decoded[($i - 1)];
1959  }
1960  }
1961 
1962  $decoded[$index++] = $char;
1963  }
1964 
1965  // convert decoded ucs4 to utf8 string
1966  foreach ($decoded as $key => $value) {
1967  if ($value < 128) {
1968  $decoded[$key] = chr($value);
1969  } elseif ($value < (1 << 11)) {
1970  $decoded[$key] = chr(192 + ($value >> 6));
1971  $decoded[$key] .= chr(128 + ($value & 63));
1972  } elseif ($value < (1 << 16)) {
1973  $decoded[$key] = chr(224 + ($value >> 12));
1974  $decoded[$key] .= chr(128 + (($value >> 6) & 63));
1975  $decoded[$key] .= chr(128 + ($value & 63));
1976  } elseif ($value < (1 << 21)) {
1977  $decoded[$key] = chr(240 + ($value >> 18));
1978  $decoded[$key] .= chr(128 + (($value >> 12) & 63));
1979  $decoded[$key] .= chr(128 + (($value >> 6) & 63));
1980  $decoded[$key] .= chr(128 + ($value & 63));
1981  } else {
1982  $this->_error(self::CANNOT_DECODE_PUNYCODE);
1983  return false;
1984  }
1985  }
1986 
1987  return implode($decoded);
1988  }
elseif(isset( $params[ 'redirect_parent']))
Definition: iframe.phtml:17
_error($messageKey, $value=null)
Definition: Abstract.php:284
$value
Definition: gender.phtml:16
$pos
Definition: list.phtml:42
$i
Definition: gallery.phtml:31
$index
Definition: list.phtml:44

◆ getAllow()

getAllow ( )

Returns the allow option

Returns
integer

Definition at line 1612 of file Hostname.php.

1613  {
1614  return $this->_options['allow'];
1615  }

◆ getIpValidator()

getIpValidator ( )

Returns the set ip validator

Returns
Zend_Validate_Ip

Definition at line 1588 of file Hostname.php.

1589  {
1590  return $this->_options['ip'];
1591  }

◆ getOptions()

getOptions ( )

Returns all set options

Returns
array

Definition at line 1551 of file Hostname.php.

1552  {
1553  return $this->_options;
1554  }

◆ getValidateIdn()

getValidateIdn ( )

Returns the set idn option

Returns
boolean

Definition at line 1634 of file Hostname.php.

1635  {
1636  return $this->_options['idn'];
1637  }

◆ getValidateTld()

getValidateTld ( )

Returns the set tld option

Returns
boolean

Definition at line 1658 of file Hostname.php.

1659  {
1660  return $this->_options['tld'];
1661  }

◆ isValid()

isValid (   $value)

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
string$value
Exceptions
Zend_Validate_Exceptionif a fatal error occurs for validation process
Returns
boolean

Match against IDN hostnames Note: Keep label regex short to avoid issues with long patterns when matching IDN hostnames

See also
Zend_Validate_Hostname_Interface

Implements Zend_Validate_Interface.

Definition at line 1686 of file Hostname.php.

1687  {
1688  if (!is_string($value)) {
1689  $this->_error(self::INVALID);
1690  return false;
1691  }
1692 
1693  $this->_setValue($value);
1694  // Check input against IP address schema
1695  if (preg_match('/^[0-9a-f:.]*$/i', $value) &&
1696  $this->_options['ip']->setTranslator($this->getTranslator())->isValid($value)) {
1697  if (!($this->_options['allow'] & self::ALLOW_IP)) {
1698  $this->_error(self::IP_ADDRESS_NOT_ALLOWED);
1699  return false;
1700  } else {
1701  return true;
1702  }
1703  }
1704 
1705  // RFC3986 3.2.2 states:
1706  //
1707  // The rightmost domain label of a fully qualified domain name
1708  // in DNS may be followed by a single "." and should be if it is
1709  // necessary to distinguish between the complete domain name and
1710  // some local domain.
1711  //
1712  // (see ZF-6363)
1713 
1714  // Local hostnames are allowed to be partitial (ending '.')
1715  if ($this->_options['allow'] & self::ALLOW_LOCAL) {
1716  if (substr($value, -1) === '.') {
1717  $value = substr($value, 0, -1);
1718  if (substr($value, -1) === '.') {
1719  // Empty hostnames (ending '..') are not allowed
1720  $this->_error(self::INVALID_LOCAL_NAME);
1721  return false;
1722  }
1723  }
1724  }
1725 
1726  $domainParts = explode('.', $value);
1727 
1728  // Prevent partitial IP V4 adresses (ending '.')
1729  if ((count($domainParts) == 4) && preg_match('/^[0-9.a-e:.]*$/i', $value) &&
1730  $this->_options['ip']->setTranslator($this->getTranslator())->isValid($value)) {
1731  $this->_error(self::INVALID_LOCAL_NAME);
1732  }
1733 
1734  // Check input against DNS hostname schema
1735  if ((count($domainParts) > 1) && (strlen($value) >= 4) && (strlen($value) <= 254)) {
1736  $status = false;
1737 
1738  $origenc = PHP_VERSION_ID < 50600
1739  ? iconv_get_encoding('internal_encoding')
1740  : ini_get('default_charset');
1741  if (PHP_VERSION_ID < 50600) {
1742  iconv_set_encoding('internal_encoding', 'UTF-8');
1743  } else {
1744  ini_set('default_charset', 'UTF-8');
1745  }
1746  do {
1747  // First check TLD
1748  $matches = array();
1749  if (preg_match('/([^.]{2,63})$/iu', end($domainParts), $matches)
1750  || (array_key_exists(end($domainParts), $this->_validIdns))) {
1751  reset($domainParts);
1752 
1753  // Hostname characters are: *(label dot)(label dot label); max 254 chars
1754  // label: id-prefix [*ldh{61} id-prefix]; max 63 chars
1755  // id-prefix: alpha / digit
1756  // ldh: alpha / digit / dash
1757 
1758  // Match TLD against known list
1759  $this->_tld = $matches[1];
1760  if ($this->_options['tld']) {
1761  if (!in_array(strtolower($this->_tld), $this->_validTlds)
1762  && !in_array($this->_tld, $this->_validTlds)) {
1763  $this->_error(self::UNKNOWN_TLD);
1764  $status = false;
1765  break;
1766  }
1767  // We have already validated that the TLD is fine. We don't want it to go through the below
1768  // checks as new UTF-8 TLDs will incorrectly fail if there is no IDN regex for it.
1769  array_pop($domainParts);
1770  }
1771 
1777  $regexChars = array(0 => '/^[a-z0-9\x2d]{1,63}$/i');
1778  if ($this->_options['idn'] && isset($this->_validIdns[strtoupper($this->_tld)])) {
1779  if (is_string($this->_validIdns[strtoupper($this->_tld)])) {
1780  $regexChars += include($this->_validIdns[strtoupper($this->_tld)]);
1781  } else {
1782  $regexChars += $this->_validIdns[strtoupper($this->_tld)];
1783  }
1784  }
1785 
1786  // Check each hostname part
1787  $check = 0;
1788  foreach ($domainParts as $domainPart) {
1789  // If some domain part is empty (i.e. zend..com), it's invalid
1790  if (empty($domainPart) && $domainPart !== '0') {
1791  $this->_error(self::INVALID_HOSTNAME);
1792  return false;
1793  }
1794 
1795  // Decode Punycode domainnames to IDN
1796  if (strpos($domainPart, 'xn--') === 0) {
1797  $domainPart = $this->decodePunycode(substr($domainPart, 4));
1798  if ($domainPart === false) {
1799  return false;
1800  }
1801  }
1802 
1803  // Check dash (-) does not start, end or appear in 3rd and 4th positions
1804  if ((strpos($domainPart, '-') === 0)
1805  || ((strlen($domainPart) > 2) && (strpos($domainPart, '-', 2) == 2) && (strpos($domainPart, '-', 3) == 3))
1806  || (strpos($domainPart, '-') === (strlen($domainPart) - 1))) {
1807  $this->_error(self::INVALID_DASH);
1808  $status = false;
1809  break 2;
1810  }
1811 
1812  // Check each domain part
1813  $checked = false;
1814  foreach($regexChars as $regexKey => $regexChar) {
1815  $status = preg_match($regexChar, $domainPart);
1816  if ($status > 0) {
1817  $length = 63;
1818  if (array_key_exists(strtoupper($this->_tld), $this->_idnLength)
1819  && (array_key_exists($regexKey, $this->_idnLength[strtoupper($this->_tld)]))) {
1820  $length = $this->_idnLength[strtoupper($this->_tld)];
1821  }
1822 
1823  if (iconv_strlen($domainPart, 'UTF-8') > $length) {
1824  $this->_error(self::INVALID_HOSTNAME);
1825  } else {
1826  $checked = true;
1827  break;
1828  }
1829  }
1830  }
1831 
1832  if ($checked) {
1833  ++$check;
1834  }
1835  }
1836 
1837  // If one of the labels doesn't match, the hostname is invalid
1838  if ($check !== count($domainParts)) {
1839  $this->_error(self::INVALID_HOSTNAME_SCHEMA);
1840  $status = false;
1841  }
1842  } else {
1843  // Hostname not long enough
1844  $this->_error(self::UNDECIPHERABLE_TLD);
1845  $status = false;
1846  }
1847  } while (false);
1848 
1849  if (PHP_VERSION_ID < 50600) {
1850  iconv_set_encoding('internal_encoding', $origenc);
1851  } else {
1852  ini_set('default_charset', $origenc);
1853  }
1854  // If the input passes as an Internet domain name, and domain names are allowed, then the hostname
1855  // passes validation
1856  if ($status && ($this->_options['allow'] & self::ALLOW_DNS)) {
1857  return true;
1858  }
1859  } else if ($this->_options['allow'] & self::ALLOW_DNS) {
1860  $this->_error(self::INVALID_HOSTNAME);
1861  }
1862 
1863  // Check for URI Syntax (RFC3986)
1864  if ($this->_options['allow'] & self::ALLOW_URI) {
1865  if (preg_match("/^([a-zA-Z0-9-._~!$&\'()*+,;=]|%[[:xdigit:]]{2}){1,254}$/i", $value)) {
1866  return true;
1867  } else {
1868  $this->_error(self::INVALID_URI);
1869  }
1870  }
1871 
1872  // Check input against local network name schema; last chance to pass validation
1873  $regexLocal = '/^(([a-zA-Z0-9\x2d]{1,63}\x2e)*[a-zA-Z0-9\x2d]{1,63}[\x2e]{0,1}){1,254}$/';
1874  $status = @preg_match($regexLocal, $value);
1875 
1876  // If the input passes as a local network name, and local network names are allowed, then the
1877  // hostname passes validation
1878  $allowLocal = $this->_options['allow'] & self::ALLOW_LOCAL;
1879  if ($status && $allowLocal) {
1880  return true;
1881  }
1882 
1883  // If the input does not pass as a local network name, add a message
1884  if (!$status) {
1885  $this->_error(self::INVALID_LOCAL_NAME);
1886  }
1887 
1888  // If local network names are not allowed, add a message
1889  if ($status && !$allowLocal) {
1890  $this->_error(self::LOCAL_NAME_NOT_ALLOWED);
1891  }
1892 
1893  return false;
1894  }
ini_set($varName, $newValue)
decodePunycode($encoded)
Definition: Hostname.php:1903
_error($messageKey, $value=null)
Definition: Abstract.php:284
$value
Definition: gender.phtml:16
$status
Definition: order_status.php:8
setTranslator($translator=null)
Definition: Abstract.php:351
$checked
Definition: billing.phtml:77

◆ setAllow()

setAllow (   $allow)

Sets the allow option

Parameters
integer$allow
Returns
Zend_Validate_Hostname Provides a fluent interface

Definition at line 1623 of file Hostname.php.

1624  {
1625  $this->_options['allow'] = $allow;
1626  return $this;
1627  }

◆ setIpValidator()

setIpValidator ( Zend_Validate_Ip  $ipValidator = null)
Parameters
Zend_Validate_Ip$ipValidatorOPTIONAL
Returns
Zend_Validate_Hostname

Definition at line 1597 of file Hostname.php.

1598  {
1599  if ($ipValidator === null) {
1600  $ipValidator = new Zend_Validate_Ip();
1601  }
1602 
1603  $this->_options['ip'] = $ipValidator;
1604  return $this;
1605  }

◆ setOptions()

setOptions (   $options)

Sets the options for this validator

Parameters
array$options
Returns
Zend_Validate_Hostname

Definition at line 1562 of file Hostname.php.

1563  {
1564  if (array_key_exists('allow', $options)) {
1565  $this->setAllow($options['allow']);
1566  }
1567 
1568  if (array_key_exists('idn', $options)) {
1569  $this->setValidateIdn($options['idn']);
1570  }
1571 
1572  if (array_key_exists('tld', $options)) {
1573  $this->setValidateTld($options['tld']);
1574  }
1575 
1576  if (array_key_exists('ip', $options)) {
1577  $this->setIpValidator($options['ip']);
1578  }
1579 
1580  return $this;
1581  }
setValidateTld($allowed)
Definition: Hostname.php:1671
setValidateIdn($allowed)
Definition: Hostname.php:1647
setIpValidator(Zend_Validate_Ip $ipValidator=null)
Definition: Hostname.php:1597

◆ setValidateIdn()

setValidateIdn (   $allowed)

Set whether IDN domains are validated

This only applies when DNS hostnames are validated

Parameters
boolean$allowedSet allowed to true to validate IDNs, and false to not validate them
Returns
$this

Definition at line 1647 of file Hostname.php.

1648  {
1649  $this->_options['idn'] = (bool) $allowed;
1650  return $this;
1651  }

◆ setValidateTld()

setValidateTld (   $allowed)

Set whether the TLD element of a hostname is validated

This only applies when DNS hostnames are validated

Parameters
boolean$allowedSet allowed to true to validate TLDs, and false to not validate them
Returns
$this

Definition at line 1671 of file Hostname.php.

1672  {
1673  $this->_options['tld'] = (bool) $allowed;
1674  return $this;
1675  }

Field Documentation

◆ $_idnLength

$_idnLength
protected
Initial value:
= 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),
)

Definition at line 1491 of file Hostname.php.

◆ $_messageTemplates

$_messageTemplates
protected
Initial value:
= 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",
)

Definition at line 64 of file Hostname.php.

◆ $_messageVariables

$_messageVariables
protected
Initial value:
= array(
'tld' => '_tld'
)

Definition at line 81 of file Hostname.php.

◆ $_options

$_options
protected
Initial value:
= array(
'allow' => self::ALLOW_DNS,
'idn' => true,
'tld' => true,
'ip' => null
)

Definition at line 1507 of file Hostname.php.

◆ $_tld

$_tld
protected

Definition at line 1305 of file Hostname.php.

◆ $_validIdns

$_validIdns
protected

Definition at line 1360 of file Hostname.php.

◆ $_validTlds

$_validTlds
protected

Definition at line 119 of file Hostname.php.

◆ ALLOW_ALL

const ALLOW_ALL = 15

Allows all types of hostnames

Definition at line 108 of file Hostname.php.

◆ ALLOW_DNS

const ALLOW_DNS = 1

Allows Internet domain names (e.g., example.com)

Definition at line 88 of file Hostname.php.

◆ ALLOW_IP

const ALLOW_IP = 2

Allows IP addresses

Definition at line 93 of file Hostname.php.

◆ ALLOW_LOCAL

const ALLOW_LOCAL = 4

Allows local network names (e.g., localhost, www.localdomain)

Definition at line 98 of file Hostname.php.

◆ ALLOW_URI

const ALLOW_URI = 8

Allows all types of hostnames

Definition at line 103 of file Hostname.php.

◆ CANNOT_DECODE_PUNYCODE

const CANNOT_DECODE_PUNYCODE = 'hostnameCannotDecodePunycode'

Definition at line 49 of file Hostname.php.

◆ INVALID

const INVALID = 'hostnameInvalid'

Definition at line 50 of file Hostname.php.

◆ INVALID_DASH

const INVALID_DASH = 'hostnameDashCharacter'

Definition at line 51 of file Hostname.php.

◆ INVALID_HOSTNAME

const INVALID_HOSTNAME = 'hostnameInvalidHostname'

Definition at line 52 of file Hostname.php.

◆ INVALID_HOSTNAME_SCHEMA

const INVALID_HOSTNAME_SCHEMA = 'hostnameInvalidHostnameSchema'

Definition at line 53 of file Hostname.php.

◆ INVALID_LOCAL_NAME

const INVALID_LOCAL_NAME = 'hostnameInvalidLocalName'

Definition at line 54 of file Hostname.php.

◆ INVALID_URI

const INVALID_URI = 'hostnameInvalidUri'

Definition at line 55 of file Hostname.php.

◆ IP_ADDRESS_NOT_ALLOWED

const IP_ADDRESS_NOT_ALLOWED = 'hostnameIpAddressNotAllowed'

Definition at line 56 of file Hostname.php.

◆ LOCAL_NAME_NOT_ALLOWED

const LOCAL_NAME_NOT_ALLOWED = 'hostnameLocalNameNotAllowed'

Definition at line 57 of file Hostname.php.

◆ UNDECIPHERABLE_TLD

const UNDECIPHERABLE_TLD = 'hostnameUndecipherableTld'

Definition at line 58 of file Hostname.php.

◆ UNKNOWN_TLD

const UNKNOWN_TLD = 'hostnameUnknownTld'

Definition at line 59 of file Hostname.php.


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