Class HTMLPurifier_AttrTransform_EnumToCSS

InheritanceHTMLPurifier_AttrTransform_EnumToCSS » HTMLPurifier_AttrTransform

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

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined 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

Hide inherited methods

MethodDescriptionDefined 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

$attr protected property
protected $attr null
$caseSensitive protected property
protected $caseSensitive false
$enumToCSS protected property
protected $enumToCSS = []

Method Details

__construct() public method

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

transform() public method

public array transform ( $attr, $config, $context )
$attr array
$config HTMLPurifier_Config
$context HTMLPurifier_Context