## Zend_Validate_Ip

Description

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

Located in /Validate/Ip.php (line 33)

    Zend_Validate_Abstract
       |
       --Zend_Validate_Ip

Class Constant Summary
INVALID = 'ipInvalid'
NOT_IP_ADDRESS = 'notIpAddress'
Variable Summary
array $_messageTemplates
array $_options
Method Summary
void __construct ([array $options = array()])
array getOptions ()
boolean isValid (mixed $value)
Zend_Validate_Ip setOptions (array $options)
void _validateIPv4 (string $value)
boolean _validateIPv6 (string $value)
Variables
array $_messageTemplates = array(
self::INVALID => "Invalid type given. String expected",
self::NOT_IP_ADDRESS => "'%value%' does not appear to be a valid IP address",
) (line 41)

- access: protected

Redefinition of:

Zend_Validate_Abstract::$_messageTemplates
  Validation failure message template definitions

array $_options = array(
'allowipv6' => true,
'allowipv4' => true
) (line 51)

internal options

- access: protected

#### Inherited Variables

Inherited from Zend_Validate_Abstract

> Zend_Validate_Abstract::$_defaultTranslator
> Zend_Validate_Abstract::$_errors
> Zend_Validate_Abstract::$_messageLength
> Zend_Validate_Abstract::$_messages
> Zend_Validate_Abstract::$_messageVariables
> Zend_Validate_Abstract::$_obscureValue
> Zend_Validate_Abstract::$_translator
> Zend_Validate_Abstract::$_translatorDisabled
> Zend_Validate_Abstract::$_value

Methods
Constructor __construct (line 62)

Sets validator options

- access: public

void __construct ([array $options = array()])

- array $options: OPTIONAL Options to set, see the manual for all available options

getOptions (line 85)

Returns all set options

- access: public

array getOptions ()
isValid (line 122)

Defined by Zend_Validate_Interface

Returns true if and only if $value is a valid IP address

- access: public

boolean isValid (mixed $value)

- mixed $value

setOptions (line 96)

Sets the options for this validator

- access: public

Zend_Validate_Ip setOptions (array $options)

- array $options

_validateIPv4 (line 145)

Validates an IPv4 address

- access: protected

void _validateIPv4 (string $value)

- string $value

_validateIPv6 (line 161)

Validates an IPv6 address

- return: True when $value is a valid ipv6 address False otherwise
- access: protected

boolean _validateIPv6 (string $value)

- string $value: Value to check against

#### Inherited Methods

Inherited From Zend_Validate_Abstract

> Zend_Validate_Abstract::getDefaultTranslator()
> Zend_Validate_Abstract::getErrors()
> Zend_Validate_Abstract::getMessageLength()
> Zend_Validate_Abstract::getMessages()
> Zend_Validate_Abstract::getMessageTemplates()
> Zend_Validate_Abstract::getMessageVariables()
> Zend_Validate_Abstract::getObscureValue()
> Zend_Validate_Abstract::getTranslator()
> Zend_Validate_Abstract::hasDefaultTranslator()
> Zend_Validate_Abstract::hasTranslator()
> Zend_Validate_Abstract::setDefaultTranslator()
> Zend_Validate_Abstract::setDisableTranslator()
> Zend_Validate_Abstract::setMessage()
> Zend_Validate_Abstract::setMessageLength()
> Zend_Validate_Abstract::setMessages()
> Zend_Validate_Abstract::setObscureValue()
> Zend_Validate_Abstract::setTranslator()
> Zend_Validate_Abstract::translatorIsDisabled()
> Zend_Validate_Abstract::_createMessage()
> Zend_Validate_Abstract::_error()
> Zend_Validate_Abstract::_setValue()
> Zend_Validate_Abstract::__get()

Class Constants
INVALID = 'ipInvalid' (line 35)
NOT_IP_ADDRESS = 'notIpAddress' (line 36)

Documentation generated on Tue, 26 Oct 2010 20:08:51 +0400 by phpDocumentor 1.4.2