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


PHP Twig_Node_Module::getNode方法代码示例

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


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

示例1: __construct

 public function __construct(Twig_Node_Module $node, array $usedFilters, array $usedTags, array $usedFunctions)
 {
     parent::__construct($node->getNode('body'), $node->getNode('parent'), $node->getNode('blocks'), $node->getNode('macros'), $node->getAttribute('filename'), $node->getLine(), $node->getNodeTag());
     $this->usedFilters = $usedFilters;
     $this->usedTags = $usedTags;
     $this->usedFunctions = $usedFunctions;
 }
开发者ID:faridos,项目名称:ServerGroveLiveChat,代码行数:7,代码来源:SandboxedModule.php

示例2: __construct

 public function __construct(Twig_Node_Module $node, array $usedFilters, array $usedTags, array $usedFunctions)
 {
     parent::__construct($node->getNode('body'), $node->getNode('parent'), $node->getNode('blocks'), $node->getNode('macros'), $node->getNode('traits'), $node->getAttribute('embedded_templates'), $node->getAttribute('filename'));
     $this->setAttribute('index', $node->getAttribute('index'));
     $this->usedFilters = $usedFilters;
     $this->usedTags = $usedTags;
     $this->usedFunctions = $usedFunctions;
 }
开发者ID:Raniratna,项目名称:new_elearning,代码行数:8,代码来源:SandboxedModule.php

示例3: testConstructor

 /**
  * @covers Twig_Node_Module::__construct
  */
 public function testConstructor()
 {
     $body = new Twig_Node_Text('foo', 0);
     $parent = new Twig_Node_Expression_Constant('layout.twig', 0);
     $blocks = new Twig_Node();
     $macros = new Twig_Node();
     $filename = 'foo.twig';
     $node = new Twig_Node_Module($body, $parent, $blocks, $macros, $filename);
     $this->assertEquals($body, $node->getNode('body'));
     $this->assertEquals($blocks, $node->getNode('blocks'));
     $this->assertEquals($macros, $node->getNode('macros'));
     $this->assertEquals($parent, $node->getNode('parent'));
     $this->assertEquals($filename, $node->getAttribute('filename'));
 }
开发者ID:vebnz,项目名称:lifelitup,代码行数:17,代码来源:ModuleTest.php

示例4: testConstructor

 public function testConstructor()
 {
     $body = new Twig_Node_Text('foo', 1);
     $parent = new Twig_Node_Expression_Constant('layout.twig', 1);
     $blocks = new Twig_Node();
     $macros = new Twig_Node();
     $traits = new Twig_Node();
     $source = new Twig_Source('{{ foo }}', 'foo.twig');
     $node = new Twig_Node_Module($body, $parent, $blocks, $macros, $traits, new Twig_Node(array()), $source);
     $this->assertEquals($body, $node->getNode('body'));
     $this->assertEquals($blocks, $node->getNode('blocks'));
     $this->assertEquals($macros, $node->getNode('macros'));
     $this->assertEquals($parent, $node->getNode('parent'));
     $this->assertEquals($source->getName(), $node->getTemplateName());
 }
开发者ID:naldz,项目名称:cyberden,代码行数:15,代码来源:ModuleTest.php


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