class TokenStream
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.
$this | push(Token $token) Pushes a token. | |
$this | freeze() Freezes stream. | |
Token | getNext() Returns next token. | |
Token | getPeek() Returns peeked token. | |
Token[] | getUsed() Returns used tokens. | |
string | getNextIdentifier() Returns nex identifier token. | |
string|null | getNextIdentifierOrStar() Returns nex identifier or star delimiter token. | |
skipWhitespace() Skips next whitespace if any. |
Pushes a token.
Token | $token |
$this |
Freezes stream.
$this |
Returns next token.
Token |
InternalErrorException | If there is no more token |
Returns peeked token.
Token |
Returns used tokens.
Token[] |
Returns nex identifier token.
string | The identifier token value |
SyntaxErrorException | If next token is not an identifier |
Returns nex identifier or star delimiter token.
string|null | The identifier token value or null if star found |
SyntaxErrorException | If next token is not an identifier or a star delimiter |
Skips next whitespace if any.
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/CssSelector/Parser/TokenStream.html