HTMLPurifier 4.4.0
HTMLPurifier_AttrDef_URI_IPv4 Class Reference

Validates an IPv4 address. More...

Inheritance diagram for HTMLPurifier_AttrDef_URI_IPv4:
HTMLPurifier_AttrDef HTMLPurifier_AttrDef HTMLPurifier_AttrDef_URI_IPv6 HTMLPurifier_AttrDef_URI_IPv6

List of all members.

Public Member Functions

 validate ($aIP, $config, $context)
 Validates and cleans passed string according to a definition.
 validate ($aIP, $config, $context)
 Validates and cleans passed string according to a definition.

Protected Member Functions

 _loadRegex ()
 Lazy load function to prevent regex from being stuffed in cache.
 _loadRegex ()
 Lazy load function to prevent regex from being stuffed in cache.

Protected Attributes

 $ip4
 IPv4 regex, protected so that IPv6 can reuse it.

Detailed Description

Validates an IPv4 address.

Author:
Feyd @ forums.devnetwork.net (public domain)

Definition at line 7 of file IPv4.php.


Member Function Documentation

HTMLPurifier_AttrDef_URI_IPv4::_loadRegex ( ) [protected]

Lazy load function to prevent regex from being stuffed in cache.

Definition at line 32 of file IPv4.php.

Referenced by HTMLPurifier_AttrDef_URI_IPv6::validate(), and validate().

HTMLPurifier_AttrDef_URI_IPv4::_loadRegex ( ) [protected]

Lazy load function to prevent regex from being stuffed in cache.

Definition at line 10533 of file HTMLPurifier.standalone.php.

HTMLPurifier_AttrDef_URI_IPv4::validate ( string,
config,
context 
)

Validates and cleans passed string according to a definition.

Parameters:
$stringString to be validated and cleaned.
$configMandatory HTMLPurifier_Config object.
$contextMandatory HTMLPurifier_AttrContext object.

Reimplemented from HTMLPurifier_AttrDef.

Reimplemented in HTMLPurifier_AttrDef_URI_IPv6, and HTMLPurifier_AttrDef_URI_IPv6.

Definition at line 10516 of file HTMLPurifier.standalone.php.

References _loadRegex().

HTMLPurifier_AttrDef_URI_IPv4::validate ( string,
config,
context 
)

Validates and cleans passed string according to a definition.

Parameters:
$stringString to be validated and cleaned.
$configMandatory HTMLPurifier_Config object.
$contextMandatory HTMLPurifier_AttrContext object.

Reimplemented from HTMLPurifier_AttrDef.

Reimplemented in HTMLPurifier_AttrDef_URI_IPv6, and HTMLPurifier_AttrDef_URI_IPv6.

Definition at line 15 of file IPv4.php.

References _loadRegex().


Member Data Documentation

HTMLPurifier_AttrDef_URI_IPv4::$ip4 [protected]

IPv4 regex, protected so that IPv6 can reuse it.

Definition at line 13 of file IPv4.php.


The documentation for this class was generated from the following files: