class Parser implements ParserInterface

CSS selector parser.

This component is a port of the Python cssselect library, which is copyright Ian Bicking, see https://github.com/SimonSapin/cssselect.

Methods

__construct(Tokenizer $tokenizer = null)

No description

array
parse(string $source)

Parses given selector source into an array of tokens.

static array
parseSeries(array $tokens)

Parses the arguments for ":nth-child()" and friends.

Details

at line 32
__construct(Tokenizer $tokenizer = null)

Parameters

Tokenizer $tokenizer

at line 40
array parse(string $source)

Parses given selector source into an array of tokens.

Parameters

string $source

Return Value

array

at line 55
static array parseSeries(array $tokens)

Parses the arguments for ":nth-child()" and friends.

Parameters

array $tokens

Return Value

array

Exceptions

SyntaxErrorException