HTMLPurifier 4.4.0
HTMLPurifier_AttrDef_CSS_Multiple Class Reference

Framework class for strings that involve multiple values. More...

Inheritance diagram for HTMLPurifier_AttrDef_CSS_Multiple:
HTMLPurifier_AttrDef HTMLPurifier_AttrDef

List of all members.

Public Member Functions

 __construct ($single, $max=4)
 validate ($string, $config, $context)
 Validates and cleans passed string according to a definition.
 __construct ($single, $max=4)
 validate ($string, $config, $context)
 Validates and cleans passed string according to a definition.

Public Attributes

 $single
 Instance of component definition to defer validation to.
 $max
 Max number of values allowed.

Detailed Description

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.

Note:
Even though the CSS specification isn't clear about it, inherit can only be used alone: it will never manifest as part of a multi shorthand declaration. Thus, this class does not allow inherit.

Definition at line 14 of file Multiple.php.


Constructor & Destructor Documentation

HTMLPurifier_AttrDef_CSS_Multiple::__construct ( single,
max = 4 
)
Parameters:
$singleHTMLPurifier_AttrDef to multiply
$maxMax number of values allowed (usually four)

Definition at line 33 of file Multiple.php.

References $max, and $single.

HTMLPurifier_AttrDef_CSS_Multiple::__construct ( single,
max = 4 
)
Parameters:
$singleHTMLPurifier_AttrDef to multiply
$maxMax number of values allowed (usually four)

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

References $max, and $single.


Member Function Documentation

HTMLPurifier_AttrDef_CSS_Multiple::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 38 of file Multiple.php.

References $config, and HTMLPurifier_AttrDef::parseCDATA().

HTMLPurifier_AttrDef_CSS_Multiple::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 9778 of file HTMLPurifier.standalone.php.

References $config, and HTMLPurifier_AttrDef::parseCDATA().


Member Data Documentation

HTMLPurifier_AttrDef_CSS_Multiple::$max

Max number of values allowed.

Todo:
Make protected
Todo:
Make protected

Definition at line 27 of file Multiple.php.

Referenced by __construct().

HTMLPurifier_AttrDef_CSS_Multiple::$single

Instance of component definition to defer validation to.

Todo:
Make protected
Todo:
Make protected

Definition at line 21 of file Multiple.php.

Referenced by __construct().


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