You are here

public function Twig_TokenStream::__construct in Translation template extractor 7.2

Same name and namespace in other branches
  1. 6.3 vendor/Twig/TokenStream.php \Twig_TokenStream::__construct()
  2. 7.3 vendor/Twig/TokenStream.php \Twig_TokenStream::__construct()

Constructor.

Parameters

array $tokens An array of tokens:

string $filename The name of the filename which tokens are associated with:

File

vendor/Twig/TokenStream.php, line 30

Class

Twig_TokenStream
Represents a token stream.

Code

public function __construct(array $tokens, $filename = null) {
  $this->tokens = $tokens;
  $this->current = 0;
  $this->filename = $filename;
}