public function __construct(\Twig_Environment $env) { parent::__construct($env); $this->typeCompilers = array('Twig_Node' => new NodeCompiler(), 'Twig_Node_Body' => new BodyCompiler(), 'Twig_Node_Module' => new ModuleCompiler\GoogleCompiler(), 'Twig_Node_Block' => new BlockCompiler(), 'Twig_Node_Text' => new TextCompiler(), 'Twig_Node_If' => new IfCompiler(), 'Twig_Node_Print' => new PrintCompiler(), 'Twig_Node_For' => new ForCompiler(), 'Twig_Node_ForLoop' => new ForLoopCompiler(), 'Twig_Node_Set' => new SetCompiler(), 'Twig_Node_Include' => new IncludeCompiler(), 'Twig_Node_Spaceless' => new SpacelessCompiler(), 'Twig_Node_SetTemp' => new SetTempCompiler(), 'Twig_Node_ExtensionReference' => new ExtensionReferenceCompiler(), 'Twig_Node_BlockReference' => new BlockReferenceCompiler(), 'Twig_Node_AutoEscape' => new AutoEscapeCompiler(), 'Twig_Node_Import' => new ImportCompiler(), 'Twig_Node_Macro' => new MacroCompiler(), 'Twig_Node_Expression_TempName' => new TempNameCompiler(), 'Twig_Node_Expression_DefaultFilter' => new DefaultFilterCompiler(), 'Twig_Node_Expression_ExtensionReference' => new ExpressionExtensionReferenceCompiler(), 'Twig_Node_Expression_Conditional' => new ConditionalCompiler(), 'Twig_Node_Expression_Array' => new ArrayCompiler(), 'Twig_Node_Expression_Function' => new FunctionCompiler(), 'Twig_Node_Expression_Parent' => new ParentCompiler(), 'Twig_Node_Expression_BlockReference' => new ExpressionBlockReferenceCompiler(), 'Twig_Node_Expression_AssignName' => new AssignNameCompiler(), 'Twig_Node_Expression_Test' => new TestCompiler(), 'Twig_Node_Expression_Name' => new NameCompiler(), 'Twig_Node_Expression_Filter' => new FilterCompiler(), 'Twig_Node_Expression_Filter_Default' => new Compiler\Expression\Filter\DefaultCompiler(), 'Twig_Node_Expression_Constant' => new ConstantCompiler(), 'Twig_Node_Expression_GetAttr' => new GetAttrCompiler(), 'Twig_Node_Expression_MacroCall' => new Compiler\Expression\MacroCallCompiler(), 'Twig_Node_Expression_MethodCall' => new Compiler\Expression\MethodCallCompiler(), 'Twig_Node_Expression_Binary_Add' => new AddCompiler(), 'Twig_Node_Expression_Binary_And' => new AndCompiler(), 'Twig_Node_Expression_Binary_BitwiseAnd' => new BitwiseAndCompiler(), 'Twig_Node_Expression_Binary_BitwiseOr' => new BitwiseOrCompiler(), 'Twig_Node_Expression_Binary_BitwiseXor' => new BitwiseXorCompiler(), 'Twig_Node_Expression_Binary_Concat' => new ConcatCompiler(), 'Twig_Node_Expression_Binary_Div' => new DivCompiler(), 'Twig_Node_Expression_Binary_Equal' => new EqualCompiler(), 'Twig_Node_Expression_Binary_FloorDiv' => new FloorDivCompiler(), 'Twig_Node_Expression_Binary_Greater' => new GreaterCompiler(), 'Twig_Node_Expression_Binary_GreaterEqual' => new GreaterEqualCompiler(), 'Twig_Node_Expression_Binary_In' => new InCompiler(), 'Twig_Node_Expression_Binary_Less' => new LessCompiler(), 'Twig_Node_Expression_Binary_LessEqual' => new LessEqualCompiler(), 'Twig_Node_Expression_Binary_Mod' => new ModCompiler(), 'Twig_Node_Expression_Binary_Mul' => new MulCompiler(), 'Twig_Node_Expression_Binary_NotEqual' => new NotEqualCompiler(), 'Twig_Node_Expression_Binary_NotIn' => new NotInCompiler(), 'Twig_Node_Expression_Binary_Or' => new OrCompiler(), 'Twig_Node_Expression_Binary_Power' => new PowerCompiler(), 'Twig_Node_Expression_Binary_Range' => new RangeCompiler(), 'Twig_Node_Expression_Binary_Sub' => new SubCompiler(), 'Twig_Node_Expression_Unary_Neg' => new NegCompiler(), 'Twig_Node_Expression_Unary_Not' => new NotCompiler(), 'Twig_Node_Expression_Unary_Pos' => new PosCompiler(), 'Twig_Node_Expression_Test_Constant' => new Compiler\Expression\Test\ConstantCompiler(), 'Twig_Node_Expression_Test_Defined' => new Compiler\Expression\Test\DefinedCompiler(), 'Twig_Node_Expression_Test_Divisibleby' => new Compiler\Expression\Test\DivisiblebyCompiler(), 'Twig_Node_Expression_Test_Even' => new Compiler\Expression\Test\EvenCompiler(), 'Twig_Node_Expression_Test_Null' => new Compiler\Expression\Test\NullCompiler(), 'Twig_Node_Expression_Test_Odd' => new Compiler\Expression\Test\OddCompiler(), 'Twig_Node_Expression_Test_Sameas' => new Compiler\Expression\Test\SameasCompiler()); $this->testCompilers = array('defined' => new DefinedCompiler(), 'divisibleby' => new DivisibleByCompiler(), 'empty' => new EmptyCompiler(), 'even' => new EvenCompiler(), 'none' => new NoneCompiler(), 'null' => new NullCompiler(), 'odd' => new OddCompiler(), 'sameas' => new SameAsCompiler()); $this->filterCompilers = array(); $this->filterFunctions = array('_default' => 'twig.filter.def', 'abs' => 'twig.filter.abs', 'batch' => 'twig.filter.batch', 'capitalize' => 'twig.filter.capitalize', 'default' => 'twig.filter.def', 'e' => 'twig.filter.escape', 'escape' => 'twig.filter.escape', 'first' => 'twig.filter.first', 'join' => 'twig.filter.join', 'json_encode' => 'twig.filter.json_encode', 'keys' => 'twig.filter.keys', 'last' => 'twig.filter.last', 'length' => 'twig.filter.length', 'lower' => 'twig.filter.lower', 'merge' => 'twig.filter.merge', 'nl2br' => 'twig.filter.nl2br', 'replace' => 'twig.filter.replace', 'reverse' => 'twig.filter.reverse', 'title' => 'twig.filter.title', 'trim' => 'twig.filter.trim', 'upper' => 'twig.filter.upper', 'url_encode' => 'encodeURIComponent'); $this->functionMap = array('max' => 'twig.functions.max', 'min' => 'twig.functions.min', 'random' => 'twig.functions.random', 'range' => 'twig.range'); }
public function __construct() { parent::__construct(); $this->source = ''; }