Class Twig_Lexer

InheritanceTwig_Lexer
ImplementsTwig_LexerInterface

Lexes a template string.

Public Methods

Hide inherited methods

MethodDescriptionDefined By
__construct() Twig_Lexer
tokenize() {@inheritdoc} Twig_Lexer

Constants

Hide inherited constants

ConstantValueDescriptionDefined By
PUNCTUATION '()[]{}?:.,|' Twig_Lexer
REGEX_DQ_STRING_DELIM '/"/A' Twig_Lexer
REGEX_DQ_STRING_PART '/[^#"\\\\]*(?:(?:\\\\.|#(?!\{))[^#"\\\\]*)*/As' Twig_Lexer
REGEX_NAME '/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/A' Twig_Lexer
REGEX_NUMBER '/[0-9]+(?:\.[0-9]+)?/A' Twig_Lexer
REGEX_STRING '/"([^#"\\\\]*(?:\\\\.[^#"\\\\]*)*)"|\'([^\'\\\\]*(?:\\\\.[^\'\\\\]*)*)\'/As' Twig_Lexer
STATE_BLOCK 1 Twig_Lexer
STATE_DATA 0 Twig_Lexer
STATE_INTERPOLATION 4 Twig_Lexer
STATE_STRING 3 Twig_Lexer
STATE_VAR 2 Twig_Lexer

Property Details

$brackets protected property
protected $brackets null
$code protected property
protected $code null
$currentVarBlockLine protected property
protected $currentVarBlockLine null
$cursor protected property
protected $cursor null
$end protected property
protected $end null
$env protected property
protected $env null
$filename protected property
protected $filename null
$lineno protected property
protected $lineno null
$options protected property
protected $options null
$position protected property
protected $position null
$positions protected property
protected $positions null
$regexes protected property
protected $regexes null
$state protected property
protected $state null
$states protected property
protected $states null
$tokens protected property
protected $tokens null

Method Details

__construct() public method

public void __construct ( Twig_Environment $env, array $options = [] )
$env
$options
getOperatorRegex() protected method

protected void getOperatorRegex ( )
lexBlock() protected method

protected void lexBlock ( )
lexComment() protected method

protected void lexComment ( )
lexData() protected method

protected void lexData ( )
lexExpression() protected method

protected void lexExpression ( )
lexInterpolation() protected method

protected void lexInterpolation ( )
lexRawData() protected method

protected void lexRawData ( $tag )
$tag
lexString() protected method

protected void lexString ( )
lexVar() protected method

protected void lexVar ( )
moveCursor() protected method

protected void moveCursor ( $text )
$text
popState() protected method

protected void popState ( )
pushState() protected method

protected void pushState ( $state )
$state
pushToken() protected method

protected void pushToken ( $type, $value '' )
$type
$value
tokenize() public method

{@inheritdoc}

public void tokenize ( $code, $filename null )
$code
$filename