TokenStream

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.

Methods

TokenStream push(Token $token)

Pushes a token.

TokenStream freeze()

Freezes stream.

Token getNext()

Returns next token.

Token getPeek()

Returns peeked token.

Token[] getUsed()

Returns used tokens.

string getNextIdentifier()

Returns nex identifier token.

null|string getNextIdentifierOrStar()

Returns nex identifier or star delimiter token.

skipWhitespace()

Skips next whitespace if any.

Details

TokenStream push(Token $token)

Pushes a token.

Parameters

Token $token

Return Value

TokenStream

TokenStream freeze()

Freezes stream.

Return Value

TokenStream

Token getNext()

Returns next token.

Return Value

Token

Exceptions

InternalErrorException If there is no more token

Token getPeek()

Returns peeked token.

Return Value

Token

Token[] getUsed()

Returns used tokens.

Return Value

Token[]

string getNextIdentifier()

Returns nex identifier token.

Return Value

string The identifier token value

Exceptions

SyntaxErrorException If next token is not an identifier

null|string getNextIdentifierOrStar()

Returns nex identifier or star delimiter token.

Return Value

null|string The identifier token value or null if star found

Exceptions

SyntaxErrorException If next token is not an identifier or a star delimiter

skipWhitespace()

Skips next whitespace if any.

doc_Symfony
2016-10-28 06:34:50
Comments
Leave a Comment

Please login to continue.