css-sanitizer
Classes to parse and sanitize CSS
|
Matcher that matches a token of a particular type. More...
Public Member Functions | |
__construct ( $type, callable $callback=null) | |
Public Member Functions inherited from Wikimedia\CSS\Grammar\Matcher | |
capture ( $captureName) | |
Return a copy of this matcher that will capture its matches. | |
matchAgainst (ComponentValueList $values, array $options=[]) | |
Match against a list of ComponentValues. | |
getDefaultOptions () | |
Fetch the default options for this Matcher. | |
setDefaultOptions (array $options) | |
Set the default options for this Matcher. | |
Protected Member Functions | |
generateMatches (ComponentValueList $values, $start, array $options) | |
@inheritDoc | |
Protected Member Functions inherited from Wikimedia\CSS\Grammar\Matcher | |
next (ComponentValueList $values, $start, array $options) | |
Find the next ComponentValue in the input, possibly skipping whitespace. | |
makeMatch (ComponentValueList $list, $start, $end, GrammarMatch $submatch=null, array $stack=[]) | |
Create a GrammarMatch. | |
Protected Attributes | |
$type | |
$callback = null | |
Protected Attributes inherited from Wikimedia\CSS\Grammar\Matcher | |
$captureName = null | |
$defaultOptions | |
Additional Inherited Members | |
Static Public Member Functions inherited from Wikimedia\CSS\Grammar\Matcher | |
static | create (... $args) |
Create an instance. | |
Matcher that matches a token of a particular type.
Wikimedia\CSS\Grammar\TokenMatcher::__construct | ( | $type, | |
callable | $callback = null ) |
string | $type | Token type to match |
callable | null | $callback | Something to call to further validate the token. bool callback( Token ) |
|
protected |
@inheritDoc
Reimplemented from Wikimedia\CSS\Grammar\Matcher.