Class HTMLPurifier_AttrDef_Enum

InheritanceHTMLPurifier_AttrDef_Enum » HTMLPurifier_AttrDef
SubclassesHTMLPurifier_AttrDef_HTML_FrameTarget

Validates a keyword against a list of valid values.

Public Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$minimized Tells us whether or not an HTML attribute is minimized. HTMLPurifier_AttrDef
$required Tells us whether or not an HTML attribute is required. HTMLPurifier_AttrDef
$valid_values Lookup table of valid values. HTMLPurifier_AttrDef_Enum

Protected Properties

Hide inherited properties

PropertyTypeDescriptionDefined By
$case_sensitive Bool indicating whether or not enumeration is case sensitive. HTMLPurifier_AttrDef_Enum

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() HTMLPurifier_AttrDef_Enum
make() HTMLPurifier_AttrDef_Enum
parseCDATA() Convenience method that parses a string as if it were CDATA. HTMLPurifier_AttrDef
validate() HTMLPurifier_AttrDef_Enum

Protected Methods

Hide inherited methods

MethodDescriptionDefined By
expandCSSEscape() Parses a possibly escaped CSS string and returns the "pure" version of it. HTMLPurifier_AttrDef
mungeRgb() Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work properly. THIS IS A HACK! HTMLPurifier_AttrDef

Property Details

$case_sensitive protected property
protected $case_sensitive false
$valid_values public property
public $valid_values = []

Method Details

__construct() public method

public void __construct ( $valid_values = [], $case_sensitive false )
$valid_values array

List of valid values

$case_sensitive bool

Whether or not case sensitive

make() public method

public HTMLPurifier_AttrDef_Enum make ( $string )
$string string

In form of comma-delimited list of case-insensitive

 valid values. Example: "foo,bar,baz". Prepend "s:" to make
 case sensitive
validate() public method

public bool|string validate ( $string, $config, $context )
$string string
$config HTMLPurifier_Config
$context HTMLPurifier_Context