当前位置: 首页>>代码示例>>PHP>>正文


PHP Twig_Compiler::__construct方法代码示例

本文整理汇总了PHP中Twig_Compiler::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Twig_Compiler::__construct方法的具体用法?PHP Twig_Compiler::__construct怎么用?PHP Twig_Compiler::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Twig_Compiler的用法示例。


在下文中一共展示了Twig_Compiler::__construct方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 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');
 }
开发者ID:raphydev,项目名称:onep,代码行数:9,代码来源:JsCompiler.php

示例2: __construct

 public function __construct()
 {
     parent::__construct();
     $this->source = '';
 }
开发者ID:betsyzhang,项目名称:chyrp,代码行数:5,代码来源:compiler.php


注:本文中的Twig_Compiler::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。