📄 hostname.php
字号:
<?php/** * 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 * @package Zend_Validate * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License * @version $Id: Hostname.php 8986 2008-03-21 21:38:32Z matthew $ *//** * @see Zend_Validate_Abstract */require_once 'Zend/Validate/Abstract.php';/** * @see Zend_Loader */require_once 'Zend/Loader.php';/** * @see Zend_Validate_Ip */require_once 'Zend/Validate/Ip.php';/** * 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. * * @category Zend * @package Zend_Validate * @copyright Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com) * @license http://framework.zend.com/license/new-bsd New BSD License */class Zend_Validate_Hostname extends Zend_Validate_Abstract{ const IP_ADDRESS_NOT_ALLOWED = 'hostnameIpAddressNotAllowed'; const UNKNOWN_TLD = 'hostnameUnknownTld'; const INVALID_DASH = 'hostnameDashCharacter'; const INVALID_HOSTNAME_SCHEMA = 'hostnameInvalidHostnameSchema'; const UNDECIPHERABLE_TLD = 'hostnameUndecipherableTld'; const INVALID_HOSTNAME = 'hostnameInvalidHostname'; const INVALID_LOCAL_NAME = 'hostnameInvalidLocalName'; const LOCAL_NAME_NOT_ALLOWED = 'hostnameLocalNameNotAllowed'; /** * @var array */ protected $_messageTemplates = array( /*self::IP_ADDRESS_NOT_ALLOWED => "'%value%' appears to be an IP address, but IP addresses are not allowed", self::UNKNOWN_TLD => "'%value%' appears to be a DNS hostname but cannot match TLD against known list", self::INVALID_DASH => "'%value%' appears to be a DNS hostname but contains a dash (-) in an invalid position", self::INVALID_HOSTNAME_SCHEMA => "'%value%' appears to be a DNS hostname but cannot match against hostname schema for TLD '%tld%'", self::UNDECIPHERABLE_TLD => "'%value%' appears to be a DNS hostname but cannot extract TLD part", self::INVALID_HOSTNAME => "'%value%' does not match the expected structure for a DNS hostname", self::INVALID_LOCAL_NAME => "'%value%' does not appear to be a valid local network name", self::LOCAL_NAME_NOT_ALLOWED => "'%value%' appears to be a local network name but local network names are not allowed" */ self::IP_ADDRESS_NOT_ALLOWED => "'%value%' semble 阾re une adresse ip mais les adresses ip ne sont pas autoris閑s", self::UNKNOWN_TLD => "'%value%' semble 阾re un nom d'h魌e DNS mais ne suis pas le modele TLD", self::INVALID_DASH => "'%value%' semble 阾re un nom d'h魌e DNS mais contient un tiret (-)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -