[ Index ]

PHP Cross Reference of moodle-2.8

title

Body

[close]

/lib/zend/Zend/Validate/ -> Hostname.php (summary)

Zend Framework LICENSE

Copyright: Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
License: http://framework.zend.com/license/new-bsd New BSD License
Version: $Id$
File Size: 740 lines (34 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Zend_Validate_Hostname:: (13 methods):
  __construct()
  getOptions()
  setOptions()
  getIpValidator()
  setIpValidator()
  getAllow()
  setAllow()
  getValidateIdn()
  setValidateIdn()
  getValidateTld()
  setValidateTld()
  isValid()
  decodePunycode()


Class: Zend_Validate_Hostname  - X-Ref

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.

__construct($options = array()   X-Ref
Sets validator options

param: integer          $allow       OPTIONAL Set what types of hostname to allow (default ALLOW_DNS)
param: boolean          $validateIdn OPTIONAL Set whether IDN domains are validated (default true)
param: boolean          $validateTld OPTIONAL Set whether the TLD element of a hostname is validated (default true)
param: Zend_Validate_Ip $ipValidator OPTIONAL
return: void

getOptions()   X-Ref
Returns all set options

return: array

setOptions($options)   X-Ref
Sets the options for this validator

param: array $options
return: Zend_Validate_Hostname

getIpValidator()   X-Ref
Returns the set ip validator

return: Zend_Validate_Ip

setIpValidator(Zend_Validate_Ip $ipValidator = null)   X-Ref

param: Zend_Validate_Ip $ipValidator OPTIONAL
return: void;

getAllow()   X-Ref
Returns the allow option

return: integer

setAllow($allow)   X-Ref
Sets the allow option

param: integer $allow
return: Zend_Validate_Hostname Provides a fluent interface

getValidateIdn()   X-Ref
Returns the set idn option

return: boolean

setValidateIdn($allowed)   X-Ref
Set whether IDN domains are validated

This only applies when DNS hostnames are validated

param: boolean $allowed Set allowed to true to validate IDNs, and false to not validate them

getValidateTld()   X-Ref
Returns the set tld option

return: boolean

setValidateTld($allowed)   X-Ref
Set whether the TLD element of a hostname is validated

This only applies when DNS hostnames are validated

param: boolean $allowed Set allowed to true to validate TLDs, and false to not validate them

isValid($value)   X-Ref
Defined by Zend_Validate_Interface

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

param: string $value
return: boolean

decodePunycode($encoded)   X-Ref
Decodes a punycode encoded string to it's original utf8 string
In case of a decoding failure the original string is returned

param: string $encoded Punycode encoded string to decode
return: string



Generated: Fri Nov 28 20:29:05 2014 Cross-referenced by PHPXref 0.7.1