public function Twig_Environment::tokenize in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/twig/twig/lib/Twig/Environment.php \Twig_Environment::tokenize()
Tokenizes a source code.
Parameters
string $source The template source code:
string $name The template name:
Return value
Twig_TokenStream A Twig_TokenStream instance
Throws
Twig_Error_Syntax When the code is syntactically wrong
1 call to Twig_Environment::tokenize()
- Twig_Environment::compileSource in vendor/
twig/ twig/ lib/ Twig/ Environment.php - Compiles a template source code.
File
- vendor/
twig/ twig/ lib/ Twig/ Environment.php, line 575
Class
- Twig_Environment
- Stores the Twig configuration.
Code
public function tokenize($source, $name = null) {
return $this
->getLexer()
->tokenize($source, $name);
}