• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP Twig_Node_Expression类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __construct

 public function __construct(Twig_Node_Expression $node, $name, $lineno)
 {
     parent::__construct(array('node' => $node), array('name' => $name, 'safe' => false), $lineno);
     if ($node instanceof Twig_Node_Expression_Name) {
         $node->setAttribute('always_defined', true);
     }
 }
开发者ID:superdav42,项目名称:Twig,代码行数:7,代码来源:GetProperty.php


示例2: addElement

 public function addElement(Twig_Node_Expression $value, Twig_Node_Expression $key = null)
 {
     if (null === $key) {
         $key = new Twig_Node_Expression_Constant(++$this->index, $value->getLine());
     }
     array_push($this->nodes, $key, $value);
 }
开发者ID:PieterSwitten,项目名称:webandmobile,代码行数:7,代码来源:Array.php


示例3: __construct

 public function __construct(Twig_Node_Expression $node, $method, Twig_Node_Expression_Array $arguments, $lineno)
 {
     parent::__construct(array('node' => $node, 'arguments' => $arguments), array('method' => $method, 'safe' => false), $lineno);
     if ($node instanceof Twig_Node_Expression_Name) {
         $node->setAttribute('always_defined', true);
     }
 }
开发者ID:jothatron,项目名称:xvwa,代码行数:7,代码来源:MethodCall.php


示例4: __construct

 public function __construct(Twig_Node_Expression $expr1, Twig_Node_Expression $expr2, Twig_Node_Expression $expr3, $lineno)
 {
     parent::__construct($lineno);
     $this->expr1 = $expr1;
     $this->expr2 = $expr2;
     $this->expr3 = $expr3;
 }
开发者ID:te-koyama,项目名称:openpne,代码行数:7,代码来源:Conditional.php


示例5: __construct

 public function __construct(Twig_Node_Expression $node, Twig_Node_Expression $attribute, Twig_Node_Expression $arguments = null, $type, $lineno)
 {
     $nodes = array('node' => $node, 'attribute' => $attribute);
     if (null !== $arguments) {
         $nodes['arguments'] = $arguments;
     }
     parent::__construct($nodes, array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => false), $lineno);
 }
开发者ID:vgrish,项目名称:twiggy,代码行数:8,代码来源:GetAttr.php


示例6: __construct

 public function __construct(Twig_Node_Expression_Filter $node)
 {
     if (!self::isDefaultFilter($node)) {
         throw new Twig_Error('The default filter node cannot be created from the given node.', $node->getLine());
     }
     $test = new Twig_Node_Expression_Test(clone $node->getNode('node'), 'defined', new Twig_Node(), $node->getLine());
     $default = count($node->getNode('arguments')) ? $node->getNode('arguments')->getNode(0) : new Twig_Node_Expression_Constant('', $node->getLine());
     $node = new Twig_Node_Expression_Conditional($test, $node, $default, $node->getLine());
     parent::__construct(array('node' => $node), array(), $node->getLine());
 }
开发者ID:bigjoevtrj,项目名称:codeigniter-bootstrap,代码行数:10,代码来源:DefaultFilter.php


示例7: __construct

 public function __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno)
 {
     parent::__construct(array('node' => $node, 'arguments' => $arguments), array('name' => $name), $lineno);
     // defined is a special case
     if ('defined' === $name) {
         if ($node instanceof Twig_Node_Expression_Name || $node instanceof Twig_Node_Expression_GetAttr) {
             $node->setAttribute('is_defined_test', true);
         } else {
             throw new Twig_Error_Syntax('The "defined" test only works with simple variables', $this->getLine());
         }
     }
 }
开发者ID:ryanhughes,项目名称:Twig,代码行数:12,代码来源:Test.php


示例8: __construct

 public function __construct(\Twig_Node $left, \Twig_Node $right, $lineno)
 {
     $arguments = [];
     foreach ([$left, $right] as $node) {
         if ($node instanceof Arguments) {
             $arguments[] = $node->getArguments();
         } elseif ($node instanceof \Twig_Node_Expression_Name) {
             $arguments[] = [$node->getAttribute('name')];
         } else {
             throw new \InvalidArgumentException('Invalid argument.');
         }
     }
     $this->arguments = array_merge($arguments[0], $arguments[1]);
     parent::__construct(array('left' => $left, 'right' => $right), array(), $lineno);
 }
开发者ID:dpolac,项目名称:twig-lambda,代码行数:15,代码来源:Arguments.php


示例9: __construct

 public function __construct(Twig_Node_Expression $node, Twig_Node_Expression $attribute, Twig_Node_Expression $arguments = null, $type, $lineno)
 {
     parent::__construct(array('node' => $node, 'attribute' => $attribute, 'arguments' => $arguments), array('type' => $type, 'is_defined_test' => false, 'ignore_strict_check' => false, 'disable_c_ext' => true), $lineno);
 }
开发者ID:sweetroll,项目名称:craft-test,代码行数:4,代码来源:GetAttr.php


示例10: __construct

 /**
  * Constructor.
  *
  * @param \Twig_Node_Expression $variables
  * @param int                   $lineno
  * @param string                $tag
  */
 public function __construct(\Twig_Node_Expression $variables, $lineno, $tag = null)
 {
     $attr = array('variables' => $variables);
     parent::__construct(array(), $attr, $lineno, $tag);
 }
开发者ID:sonatra,项目名称:SonatraMailerBundle,代码行数:12,代码来源:ParentLayoutNode.php


示例11: __construct

 public function __construct(Twig_Node_Expression_Name $name, Twig_NodeInterface $arguments, $lineno)
 {
     parent::__construct(array('name' => $name, 'arguments' => $arguments), array(), $lineno);
 }
开发者ID:vebnz,项目名称:lifelitup,代码行数:4,代码来源:Function.php


示例12: __construct

 public function __construct(Twig_NodeInterface $node, Twig_Node_Expression_Constant $filterName, Twig_NodeInterface $arguments, $lineno, $tag = null)
 {
     parent::__construct(array('node' => $node, 'filter' => $filterName, 'arguments' => $arguments), array(), $lineno, $tag);
 }
开发者ID:jackbravo,项目名称:symfony-sandbox,代码行数:4,代码来源:Filter.php


示例13: __construct

 public function __construct(Twig_Node $node, $attr, $arguments, $lineno, $token_value)
 {
     parent::__construct($lineno);
     $this->node = $node;
     $this->attr = $attr;
     $this->arguments = $arguments;
     $this->token_value = $token_value;
 }
开发者ID:skoop,项目名称:MediTerra,代码行数:8,代码来源:GetAttr.php


示例14: __construct

 /**
  * @param Twig_Node|null $template
  */
 public function __construct(Twig_NodeInterface $name, $template = null, $lineno, $tag = null)
 {
     if (is_bool($template)) {
         @trigger_error(sprintf('The %s method "$asString" argument is deprecated since version 1.28 and will be removed in 2.0.', __METHOD__), E_USER_DEPRECATED);
         $template = null;
     }
     $nodes = array('name' => $name);
     if (null !== $template) {
         $nodes['template'] = $template;
     }
     parent::__construct($nodes, array('is_defined_test' => false, 'output' => false), $lineno, $tag);
 }
开发者ID:richlove1,项目名称:avc-october,代码行数:15,代码来源:BlockReference.php


示例15: __construct

 public function __construct($name, $lineno)
 {
     parent::__construct(array(), array('name' => $name, 'is_defined_test' => false), $lineno);
 }
开发者ID:ryanhughes,项目名称:Twig,代码行数:4,代码来源:Name.php


示例16: __construct

 public function __construct($elements, $lineno)
 {
     parent::__construct($lineno);
     $this->elements = $elements;
 }
开发者ID:skoop,项目名称:MediTerra,代码行数:5,代码来源:Array.php


示例17: __construct

 public function __construct(Twig_NodeInterface $left, Twig_NodeInterface $right, $lineno)
 {
     parent::__construct(array('left' => $left, 'right' => $right), array(), $lineno);
 }
开发者ID:BozzaCoon,项目名称:SPHERE-Framework,代码行数:4,代码来源:Binary.php


示例18: __construct

 public function __construct(Twig_NodeInterface $node, $name, Twig_NodeInterface $arguments = null, $lineno)
 {
     parent::__construct(array('node' => $node, 'arguments' => $arguments), array('name' => $name), $lineno);
 }
开发者ID:rfc1483,项目名称:symfony,代码行数:4,代码来源:Test.php


示例19: __construct

 public function __construct(Twig_NodeInterface $name, $asString = false, $lineno, $tag = null)
 {
     parent::__construct(array('name' => $name), array('as_string' => $asString, 'output' => false), $lineno, $tag);
 }
开发者ID:ceroberoz,项目名称:kurs,代码行数:4,代码来源:BlockReference.php


示例20: __construct

 public function __construct($name, $lineno)
 {
     parent::__construct($lineno);
     $this->name = $name;
 }
开发者ID:skoop,项目名称:MediTerra,代码行数:5,代码来源:Name.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP Twig_Node_Expression_Array类代码示例发布时间:2022-05-23
下一篇:
PHP Twig_NodeInterface类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap