Class HTMLPurifier_AttrDef_CSS_Multiple

InheritanceHTMLPurifier_AttrDef_CSS_Multiple » HTMLPurifier_AttrDef

Framework class for strings that involve multiple values.

Certain CSS properties such as border-width and margin allow multiple lengths to be specified. This class can take a vanilla border-width definition and multiply it, usually into a max of four.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$max Max number of values allowed. HTMLPurifier_AttrDef_CSS_Multiple
$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
$single Instance of component definition to defer validation to. HTMLPurifier_AttrDef_CSS_Multiple

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() HTMLPurifier_AttrDef_CSS_Multiple
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_CSS_Multiple

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

$max public property
public $max null
$single public property
public $single null

Method Details

__construct() public method

public void __construct ( $single, $max 4 )
$single HTMLPurifier_AttrDef

HTMLPurifier_AttrDef to multiply

$max int

Max number of values allowed (usually four)

validate() public method

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