Class HTMLPurifier_AttrTransform_EnumToCSS
Inheritance | HTMLPurifier_AttrTransform_EnumToCSS » HTMLPurifier_AttrTransform |
---|
Generic pre-transform that converts an attribute with a fixed number of values (enumerated) to CSS.
Protected Properties
Property | Type | Description | Defined By |
---|---|---|---|
$attr | Name of attribute to transform from. | HTMLPurifier_AttrTransform_EnumToCSS | |
$caseSensitive | Case sensitivity of the matching. | HTMLPurifier_AttrTransform_EnumToCSS | |
$enumToCSS | Lookup array of attribute values to CSS. | HTMLPurifier_AttrTransform_EnumToCSS |
Public Methods
Method | Description | Defined By |
---|---|---|
__construct() | HTMLPurifier_AttrTransform_EnumToCSS | |
confiscateAttr() | Retrieves and removes an attribute | HTMLPurifier_AttrTransform |
prependCSS() | Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist. | HTMLPurifier_AttrTransform |
transform() | HTMLPurifier_AttrTransform_EnumToCSS |
Property Details
Method Details
public void __construct ( $attr, $enum_to_css, $case_sensitive = false ) | ||
$attr | string | Attribute name to transform from |
$enum_to_css | array | Lookup array of attribute values to CSS |
$case_sensitive | bool | Case sensitivity indicator, default false |
public array transform ( $attr, $config, $context ) | ||
$attr | array | |
$config | HTMLPurifier_Config | |
$context | HTMLPurifier_Context |