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

Public Member Functions

 __construct ($negative=true, $zero=true, $positive=true)
 validate ($integer, $config, $context)

Protected Attributes

 $negative = true
 $zero = true
 $positive = true

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

__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.


Member Function Documentation

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.

Here is the call graph for this function:


Field Documentation

$negative = true [protected]

Bool indicating whether or not negative values are allowed

Definition at line 16 of file Integer.php.

$positive = true [protected]

Bool indicating whether or not positive values are allowed

Definition at line 26 of file Integer.php.

$zero = true [protected]

Bool indicating whether or not zero is allowed

Definition at line 21 of file Integer.php.


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