Represents a token stream.
final | |
---|---|
author | Fabien Potencier fabien@symfony.com |
package | Default |
__construct(array $tokens,string|null $name = null,string|null $source = null)
array
An array of tokens
string|null
The name of the template which tokens are associated with
string|null
The source code associated with the tokens
__toString()
expect( $type, $value = null, $message = null): \Twig\Token
\Twig\Token
getCurrent(): \Twig\Token
\Twig\Token
getFilename(): string|null
deprecated | since 1.27 (to be removed in 2.0) |
---|---|
string|null
injectTokens(array $tokens)
array
isEOF(): boolean
boolean
look(integer $number = 1): \Twig\Token
integer
\Twig\Token
next(): \Twig\Token
\Twig\Token
nextIf( $primary, $secondary = null): \Twig\Token|null
\Twig\Token|null
The next token if the condition is true, null otherwise
test( $primary, $secondary = null): boolean
boolean
tokens :
current :
filename :
source :