當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。