Copied!

CSS selector token stream.

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

CloneableInstantiable
Methods
public freeze() : static
 

Freezes stream.

  • return $this
public getNext() : Symfony\Component\CssSelector\Parser\Token
 

Returns next token.

  • throws \InternalErrorException If there is no more token
public getNextIdentifier() : string
 

Returns next identifier token.

  • throws \SyntaxErrorException If next token is not an identifier
public getNextIdentifierOrStar() : ?string
 

Returns next identifier or null if star delimiter token is found.

  • throws \SyntaxErrorException If next token is not an identifier or a star delimiter
public getPeek() : Symfony\Component\CssSelector\Parser\Token
 

Returns peeked token.

public getUsed() : array
 

Returns used tokens.

  • return \Token[]
public push(Symfony\Component\CssSelector\Parser\Token $token) : static
 

Pushes a token.

  • return $this
public skipWhitespace() : void
 

Skips next whitespace if any.

Properties
private int $cursor = 0
private ?Symfony\Component\CssSelector\Parser\Token $peeked
private bool $peeking = false
private array $tokens = []
 
  • var \Token[]
private array $used = []
 
  • var \Token[]
© 2024 Bruce Wells
Search Namespaces \ Classes
Configuration