HTMLPurifier 4.4.0
HTMLPurifier_AttrDef_Integer Class Reference

Validates an integer. More...

Inheritance diagram for HTMLPurifier_AttrDef_Integer:
HTMLPurifier_AttrDef HTMLPurifier_AttrDef

List of all members.

Public Member Functions

 __construct ($negative=true, $zero=true, $positive=true)
 validate ($integer, $config, $context)
 Validates and cleans passed string according to a definition.
 __construct ($negative=true, $zero=true, $positive=true)
 validate ($integer, $config, $context)
 Validates and cleans passed string according to a definition.

Protected Attributes

 $negative = true
 Bool indicating whether or not negative values are allowed.
 $zero = true
 Bool indicating whether or not zero is allowed.
 $positive = true
 Bool indicating whether or not positive values are allowed.

Detailed Description

Validates an integer.

Note:
While this class was modeled off the CSS definition, no currently allowed CSS uses this type. The properties that do are: widows, orphans, z-index, counter-increment, counter-reset. Some of the HTML attributes, however, find use for a non-negative version of this.

Definition at line 10 of file Integer.php.


Constructor & Destructor Documentation

HTMLPurifier_AttrDef_Integer::__construct ( negative = true,
zero = true,
positive = true 
)
Parameters:
$negativeBool indicating whether or not negative values are allowed
$zeroBool indicating whether or not zero is allowed
$positiveBool indicating whether or not positive values are allowed

Definition at line 33 of file Integer.php.

References $negative, $positive, and $zero.

HTMLPurifier_AttrDef_Integer::__construct ( negative = true,
zero = true,
positive = true 
)
Parameters:
$negativeBool indicating whether or not negative values are allowed
$zeroBool indicating whether or not zero is allowed
$positiveBool indicating whether or not positive values are allowed

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

References $negative, $positive, and $zero.


Member Function Documentation

HTMLPurifier_AttrDef_Integer::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.

Definition at line 41 of file Integer.php.

References HTMLPurifier_AttrDef::parseCDATA().

HTMLPurifier_AttrDef_Integer::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.

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

References HTMLPurifier_AttrDef::parseCDATA().


Member Data Documentation

HTMLPurifier_AttrDef_Integer::$negative = true [protected]

Bool indicating whether or not negative values are allowed.

Definition at line 16 of file Integer.php.

Referenced by __construct().

HTMLPurifier_AttrDef_Integer::$positive = true [protected]

Bool indicating whether or not positive values are allowed.

Definition at line 26 of file Integer.php.

Referenced by __construct().

HTMLPurifier_AttrDef_Integer::$zero = true [protected]

Bool indicating whether or not zero is allowed.

Definition at line 21 of file Integer.php.

Referenced by __construct().


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