Class Zend_Validate_Hostname

Description

Implements interfaces:

  • license: New BSD License
  • copyright: Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)

Located in /Validate/Hostname.php (line 36)


	
			
Class Constant Summary
Variable Summary
 integer $_allow
 array $_messages
Method Summary
 void __construct ([integer $allow = self::ALLOW_ALL])
 integer getAllow ()
 array getMessages ()
 boolean isValid (mixed $value)
 Zend_Validate_Hostname setAllow (integer $allow)
Variables
integer $_allow (line 63)

Bit field of ALLOW constants; determines which types of hostnames are allowed

  • access: protected
array $_messages = array() (line 70)

Array of validation failure messages

  • access: protected
Methods
Constructor __construct (line 78)

Sets validator options

  • access: public
void __construct ([integer $allow = self::ALLOW_ALL])
  • integer $allow
getAllow (line 88)

Returns the allow option

  • access: public
integer getAllow ()
getMessages (line 181)

Defined by Zend_Validate_Interface

Returns array of validation failure messages

  • access: public
array getMessages ()

Implementation of:
Zend_Validate_Interface::getMessages()
Returns an array of messages that explain why a previous isValid() call returned false
isValid (line 114)

Defined by Zend_Validate_Interface

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

  • access: public
  • throws: Zend_Validate_Exception if a fatal error occurs for validation process
boolean isValid (mixed $value)
  • mixed $value

Implementation of:
Zend_Validate_Interface::isValid()
Returns true if and only if $value meets the validation requirements
setAllow (line 99)

Sets the allow option

  • return: Provides a fluent interface
  • access: public
Zend_Validate_Hostname setAllow (integer $allow)
  • integer $allow
Class Constants
ALLOW_ALL = 7 (line 56)

Allows all types of hostnames

ALLOW_DNS = 1 (line 41)

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

ALLOW_IP = 2 (line 46)

Allows IP addresses

ALLOW_LOCAL = 4 (line 51)

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

Documentation generated on Thu, 18 Jan 2007 10:00:54 -0800 by phpDocumentor 1.3.1