You are here

interface Twig_LexerInterface in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/Twig/LexerInterface.php \Twig_LexerInterface

Interface implemented by lexer classes.

@author Fabien Potencier <fabien@symfony.com>

Hierarchy

Expanded class hierarchy of Twig_LexerInterface

All classes that implement Twig_LexerInterface

Deprecated

since 1.12 (to be removed in 3.0)

File

vendor/twig/twig/lib/Twig/LexerInterface.php, line 19

View source
interface Twig_LexerInterface {

  /**
   * Tokenizes a source code.
   *
   * @param string $code     The source code
   * @param string $filename A unique identifier for the source code
   *
   * @return Twig_TokenStream A token stream instance
   *
   * @throws Twig_Error_Syntax When the code is syntactically wrong
   */
  public function tokenize($code, $filename = null);

}

Members

Namesort descending Modifiers Type Description Overrides
Twig_LexerInterface::tokenize public function Tokenizes a source code. 1