HTMLPurifier 4.4.0
HTMLPurifier_AttrTransform_EnumToCSS Class Reference

Generic pre-transform that converts an attribute with a fixed number of values (enumerated) to CSS. More...

Inheritance diagram for HTMLPurifier_AttrTransform_EnumToCSS:
HTMLPurifier_AttrTransform HTMLPurifier_AttrTransform

List of all members.

Public Member Functions

 __construct ($attr, $enum_to_css, $case_sensitive=false)
 transform ($attr, $config, $context)
 Abstract: makes changes to the attributes dependent on multiple values.
 __construct ($attr, $enum_to_css, $case_sensitive=false)
 transform ($attr, $config, $context)
 Abstract: makes changes to the attributes dependent on multiple values.

Protected Attributes

 $attr
 Name of attribute to transform from.
 $enumToCSS = array()
 Lookup array of attribute values to CSS.
 $caseSensitive = false
 Case sensitivity of the matching.

Detailed Description

Generic pre-transform that converts an attribute with a fixed number of values (enumerated) to CSS.

Definition at line 7 of file EnumToCSS.php.


Constructor & Destructor Documentation

HTMLPurifier_AttrTransform_EnumToCSS::__construct ( attr,
enum_to_css,
case_sensitive = false 
)
Parameters:
$attrString attribute name to transform from
$enumToCSSLookup array of attribute values to CSS
$case_sensitiveBoolean case sensitivity indicator, default false

Definition at line 31 of file EnumToCSS.php.

References $attr.

HTMLPurifier_AttrTransform_EnumToCSS::__construct ( attr,
enum_to_css,
case_sensitive = false 
)
Parameters:
$attrString attribute name to transform from
$enumToCSSLookup array of attribute values to CSS
$case_sensitiveBoolean case sensitivity indicator, default false

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

References $attr.


Member Function Documentation

HTMLPurifier_AttrTransform_EnumToCSS::transform ( attr,
config,
context 
)

Abstract: makes changes to the attributes dependent on multiple values.

Parameters:
$attrAssoc array of attributes, usually from HTMLPurifier_Token_Tag::$attr
$configMandatory HTMLPurifier_Config object.
$contextMandatory HTMLPurifier_Context object
Returns:
Processed attribute array.

Reimplemented from HTMLPurifier_AttrTransform.

Definition at line 37 of file EnumToCSS.php.

References $attr, and HTMLPurifier_AttrTransform::prependCSS().

HTMLPurifier_AttrTransform_EnumToCSS::transform ( attr,
config,
context 
)

Abstract: makes changes to the attributes dependent on multiple values.

Parameters:
$attrAssoc array of attributes, usually from HTMLPurifier_Token_Tag::$attr
$configMandatory HTMLPurifier_Config object.
$contextMandatory HTMLPurifier_Context object
Returns:
Processed attribute array.

Reimplemented from HTMLPurifier_AttrTransform.

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

References $attr, and HTMLPurifier_AttrTransform::prependCSS().


Member Data Documentation

HTMLPurifier_AttrTransform_EnumToCSS::$attr [protected]

Name of attribute to transform from.

Definition at line 12 of file EnumToCSS.php.

Referenced by __construct(), and transform().

HTMLPurifier_AttrTransform_EnumToCSS::$caseSensitive = false [protected]

Case sensitivity of the matching.

Warning:
Currently can only be guaranteed to work with ASCII values.

Definition at line 24 of file EnumToCSS.php.

HTMLPurifier_AttrTransform_EnumToCSS::$enumToCSS = array() [protected]

Lookup array of attribute values to CSS.

Definition at line 17 of file EnumToCSS.php.


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