Moodle  2.2.1
http://www.collinsharper.com
Zend_Validate_Ip Class Reference
Inheritance diagram for Zend_Validate_Ip:
Collaboration diagram for Zend_Validate_Ip:

Public Member Functions

 __construct ($options=array())
 getOptions ()
 setOptions ($options)
 isValid ($value)

Data Fields

const INVALID = 'ipInvalid'
const NOT_IP_ADDRESS = 'notIpAddress'

Protected Member Functions

 _validateIPv4 ($value)
 _validateIPv6 ($value)

Protected Attributes

 $_messageTemplates
 $_options

Detailed Description

Definition at line 33 of file Ip.php.


Constructor & Destructor Documentation

__construct ( options = array())

Sets validator options

Parameters:
array$optionsOPTIONAL Options to set, see the manual for all available options
Returns:
void

Definition at line 62 of file Ip.php.

Here is the call graph for this function:


Member Function Documentation

_validateIPv4 ( value) [protected]

Validates an IPv4 address

Parameters:
string$value

Definition at line 145 of file Ip.php.

Here is the caller graph for this function:

_validateIPv6 ( value) [protected]

Validates an IPv6 address

Parameters:
string$valueValue to check against
Returns:
boolean True when $value is a valid ipv6 address False otherwise

Definition at line 161 of file Ip.php.

Here is the call graph for this function:

Here is the caller graph for this function:

Returns all set options

Returns:
array

Definition at line 85 of file Ip.php.

isValid ( value)

Defined by Zend_Validate_Interface

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

Parameters:
mixed$value
Returns:
boolean

Implements Zend_Validate_Interface.

Definition at line 122 of file Ip.php.

Here is the call graph for this function:

setOptions ( options)

Sets the options for this validator

Parameters:
array$options
Returns:
Zend_Validate_Ip

Definition at line 96 of file Ip.php.

Here is the caller graph for this function:


Field Documentation

$_messageTemplates [protected]
Initial value:
 array(
        self::INVALID        => "Invalid type given, value should be a string",
        self::NOT_IP_ADDRESS => "'%value%' does not appear to be a valid IP address",
    )

Reimplemented from Zend_Validate_Abstract.

Definition at line 41 of file Ip.php.

$_options [protected]
Initial value:
 array(
        'allowipv6' => true,
        'allowipv4' => true
    )

Definition at line 51 of file Ip.php.

const INVALID = 'ipInvalid'

Definition at line 35 of file Ip.php.

const NOT_IP_ADDRESS = 'notIpAddress'

Definition at line 36 of file Ip.php.


The documentation for this class was generated from the following file:
 All Data Structures Namespaces Files Functions Variables Enumerations