Class HTMLPurifier_AttrDef_Integer

InheritanceHTMLPurifier_AttrDef_Integer » HTMLPurifier_AttrDef

Validates an integer.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$minimized Tells us whether or not an HTML attribute is minimized. HTMLPurifier_AttrDef
$required Tells us whether or not an HTML attribute is required. HTMLPurifier_AttrDef

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$negative Whether or not negative values are allowed. HTMLPurifier_AttrDef_Integer
$positive Whether or not positive values are allowed. HTMLPurifier_AttrDef_Integer
$zero Whether or not zero is allowed. HTMLPurifier_AttrDef_Integer

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() HTMLPurifier_AttrDef_Integer
make() Factory method for creating this class from a string. HTMLPurifier_AttrDef
parseCDATA() Convenience method that parses a string as if it were CDATA. HTMLPurifier_AttrDef
validate() HTMLPurifier_AttrDef_Integer

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
expandCSSEscape() Parses a possibly escaped CSS string and returns the "pure" version of it. HTMLPurifier_AttrDef
mungeRgb() Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work properly. THIS IS A HACK! HTMLPurifier_AttrDef

Property Details

$negative protected property
protected $negative true
$positive protected property
protected $positive true
$zero protected property
protected $zero true

Method Details

__construct() public method

public void __construct ( $negative true, $zero true, $positive true )
$negative

Bool indicating whether or not negative values are allowed

$zero

Bool indicating whether or not zero is allowed

$positive

Bool indicating whether or not positive values are allowed

validate() public method

public bool|string validate ( $integer, $config, $context )
$integer string
$config HTMLPurifier_Config
$context HTMLPurifier_Context