1<?php 2 3/* 4 * This file is part of Twig. 5 * 6 * (c) Fabien Potencier 7 * 8 * For the full copyright and license information, please view the LICENSE 9 * file that was distributed with this source code. 10 */ 11 12use Twig\Error\SyntaxError; 13use Twig\Source; 14use Twig\TokenStream; 15 16/** 17 * Interface implemented by lexer classes. 18 * 19 * @author Fabien Potencier <fabien@symfony.com> 20 * 21 * @deprecated since 1.12 (to be removed in 3.0) 22 */ 23interface Twig_LexerInterface 24{ 25 /** 26 * Tokenizes a source code. 27 * 28 * @param string|Source $code The source code 29 * @param string $name A unique identifier for the source code 30 * 31 * @return TokenStream 32 * 33 * @throws SyntaxError When the code is syntactically wrong 34 */ 35 public function tokenize($code, $name = null); 36} 37