Class HTMLPurifier_AttrDef_CSS_Number
| Inheritance | HTMLPurifier_AttrDef_CSS_Number » HTMLPurifier_AttrDef |
|---|---|
| Subclasses | HTMLPurifier_AttrDef_CSS_AlphaValue |
Validates a number as defined by the CSS spec.
Public Properties
| Property | Type | Description | Defined 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 |
Protected Properties
| Property | Type | Description | Defined By |
|---|---|---|---|
| $non_negative | Indicates whether or not only positive values are allowed. | HTMLPurifier_AttrDef_CSS_Number |
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | HTMLPurifier_AttrDef_CSS_Number | |
| make() | Factory method for creating this class from a string. | HTMLPurifier_AttrDef |
| parseCDATA() | Convenience method that parses a string as if it were CDATA. | HTMLPurifier_AttrDef |
| validate() | HTMLPurifier_AttrDef_CSS_Number |
Protected Methods
| Method | Description | Defined 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
Method Details
| public void __construct ( $non_negative = false ) | ||
| $non_negative | bool | Indicates whether negatives are forbidden |
| public string|bool validate ( $number, $config, $context ) | ||
| $number | string | |
| $config | HTMLPurifier_Config | |
| $context | HTMLPurifier_Context | |