first commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Generic pre-transform that converts an attribute with a fixed number of
|
||||
|
||||
* values (enumerated) to CSS.
|
||||
|
||||
*/
|
||||
|
||||
class HTMLPurifier_AttrTransform_EnumToCSS extends HTMLPurifier_AttrTransform {
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Name of attribute to transform from
|
||||
|
||||
*/
|
||||
|
||||
protected $attr;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Lookup array of attribute values to CSS
|
||||
|
||||
*/
|
||||
|
||||
protected $enumToCSS = array();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* Case sensitivity of the matching
|
||||
|
||||
* @warning Currently can only be guaranteed to work with ASCII
|
||||
|
||||
* values.
|
||||
|
||||
*/
|
||||
|
||||
protected $caseSensitive = false;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
|
||||
* @param $attr String attribute name to transform from
|
||||
|
||||
* @param $enumToCSS Lookup array of attribute values to CSS
|
||||
|
||||
* @param $case_sensitive Boolean case sensitivity indicator, default false
|
||||
|
||||
Reference in New Issue
Block a user