css-sanitizer
Classes to parse and sanitize CSS
Loading...
Searching...
No Matches
Wikimedia\CSS\Grammar\DelimMatcher Class Reference

Matcher that matches one of a set of values. More...

+ Inheritance diagram for Wikimedia\CSS\Grammar\DelimMatcher:
+ Collaboration diagram for Wikimedia\CSS\Grammar\DelimMatcher:

Public Member Functions

 __construct ( $values, array $options=[])
 
- 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
 
 $values
 
- 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.
 

Detailed Description

Matcher that matches one of a set of values.

This is intended for matching specific <delim-token>s, but will work for other types (case-sensitively) too. For the more common case-insensitive identifier matching, use KeywordMatcher.

See also
https://www.w3.org/TR/2019/CR-css-values-3-20190606/#component-types

Constructor & Destructor Documentation

◆ __construct()

Wikimedia\CSS\Grammar\DelimMatcher::__construct ( $values,
array $options = [] )
Parameters
string | string[]$valuesToken values to match
array$optionsOptions
  • type: (string) Token type to match. Default is Token::T_DELIM.

Member Function Documentation

◆ generateMatches()

Wikimedia\CSS\Grammar\DelimMatcher::generateMatches ( ComponentValueList $values,
$start,
array $options )
protected

@inheritDoc

Reimplemented from Wikimedia\CSS\Grammar\Matcher.


The documentation for this class was generated from the following file: