Sanitizes a Declaration.
More...
◆ __construct()
Wikimedia\CSS\Sanitizer\PropertySanitizer::__construct |
( |
array | $properties = [], |
|
|
?Matcher | $cssWideKeywordsMatcher = null ) |
- Parameters
-
Matcher[] | $properties | Array mapping declaration names (lowercase) to Matchers for the values |
Matcher | null | $cssWideKeywordsMatcher | Matcher for keywords that should be recognized for all known properties. |
◆ addKnownProperties()
Wikimedia\CSS\Sanitizer\PropertySanitizer::addKnownProperties |
( |
| $props | ) |
|
Merge a list of matchers into the list of known properties.
- Parameters
-
Matcher[] | $props | Array mapping declaration names (lowercase) to Matchers for the values |
- Exceptions
-
InvalidArgumentException | if some property is already defined |
◆ doSanitize()
Wikimedia\CSS\Sanitizer\PropertySanitizer::doSanitize |
( |
CSSObject | $object | ) |
|
|
protected |
◆ getCssWideKeywordsMatcher()
Wikimedia\CSS\Sanitizer\PropertySanitizer::getCssWideKeywordsMatcher |
( |
| ) |
|
Fetch the matcher for keywords that should be recognized for all properties.
- Returns
- Matcher
◆ getKnownProperties()
Wikimedia\CSS\Sanitizer\PropertySanitizer::getKnownProperties |
( |
| ) |
|
Access the list of known properties.
- Returns
- Matcher[]
◆ setCssWideKeywordsMatcher()
Wikimedia\CSS\Sanitizer\PropertySanitizer::setCssWideKeywordsMatcher |
( |
Matcher | $matcher | ) |
|
Set the matcher for keywords that should be recognized for all properties.
- Parameters
-
◆ setKnownProperties()
Wikimedia\CSS\Sanitizer\PropertySanitizer::setKnownProperties |
( |
array | $properties | ) |
|
Set the list of known properties.
- Parameters
-
Matcher[] | $properties | Array mapping declaration names (lowercase) to Matchers for the values |
The documentation for this class was generated from the following file: