當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Expr::__construct方法代碼示例

本文整理匯總了PHP中PhpParser\Node\Expr::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Expr::__construct方法的具體用法?PHP Expr::__construct怎麽用?PHP Expr::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在PhpParser\Node\Expr的用法示例。


在下文中一共展示了Expr::__construct方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructs a static method call node.
  *
  * @param Node\Name|Expr $class Class name
  * @param string|Expr $name Method name
  * @param Node\Arg[] $args Arguments
  * @param array $attributes Additional attributes
  */
 public function __construct($class, $name, array $args = array(), array $attributes = array())
 {
     parent::__construct($attributes);
     $this->class = $class;
     $this->name = $name;
     $this->args = $args;
 }
開發者ID:JesseDarellMoore,項目名稱:CS499,代碼行數:15,代碼來源:StaticCall.php

示例2: __construct

 /**
  * Constructs an array item node.
  *
  * @param Expr $value Value
  * @param null|Expr $key Key
  * @param bool $byRef Whether to assign by reference
  * @param array $attributes Additional attributes
  */
 public function __construct(Expr $value, Expr $key = null, $byRef = false, array $attributes = array())
 {
     parent::__construct($attributes);
     $this->key = $key;
     $this->value = $value;
     $this->byRef = $byRef;
 }
開發者ID:JesseDarellMoore,項目名稱:CS499,代碼行數:15,代碼來源:ArrayItem.php

示例3: __construct

 /**
  * Constructs a ternary operator node.
  *
  * @param Expr      $cond       Condition
  * @param null|Expr $if         Expression for true
  * @param Expr      $else       Expression for false
  * @param array                    $attributes Additional attributes
  */
 public function __construct(Expr $cond, $if, Expr $else, array $attributes = array())
 {
     parent::__construct(null, $attributes);
     $this->cond = $cond;
     $this->if = $if;
     $this->else = $else;
 }
開發者ID:fakrunt,項目名稱:itmarkerz,代碼行數:15,代碼來源:Ternary.php

示例4: __construct

 /**
  * Constructs a function call node.
  *
  * @param Expr        $var        Variable holding object
  * @param string|Expr $name       Method name
  * @param Arg[]       $args       Arguments
  * @param array       $attributes Additional attributes
  */
 public function __construct(Expr $var, $name, array $args = array(), array $attributes = array())
 {
     parent::__construct(null, $attributes);
     $this->var = $var;
     $this->name = $name;
     $this->args = $args;
 }
開發者ID:TYPO3,項目名稱:extension_builder,代碼行數:15,代碼來源:MethodCall.php

示例5: __construct

 /**
  * Constructs a lambda function node.
  *
  * @param array $subNodes   Array of the following optional subnodes:
  *                          'static'     => false  : Whether the closure is static
  *                          'byRef'      => false  : Whether to return by reference
  *                          'params'     => array(): Parameters
  *                          'uses'       => array(): use()s
  *                          'returnType' => null   : Return type
  *                          'stmts'      => array(): Statements
  * @param array $attributes Additional attributes
  */
 public function __construct(array $subNodes = array(), array $attributes = array()) {
     parent::__construct($attributes);
     $this->static = isset($subNodes['static']) ? $subNodes['static'] : false;
     $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
     $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
     $this->uses = isset($subNodes['uses']) ? $subNodes['uses'] : array();
     $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
     $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
 }
開發者ID:nikic,項目名稱:PHP-Parser,代碼行數:21,代碼來源:Closure.php

示例6: __construct

 /**
  * Constructs a shell exec (backtick) node.
  *
  * @param array $parts      Encapsed string array
  * @param array $attributes Additional attributes
  */
 public function __construct($parts, array $attributes = array())
 {
     parent::__construct(array('parts' => $parts), $attributes);
 }
開發者ID:Ingothq,項目名稱:multiarmedbandit,代碼行數:10,代碼來源:ShellExec.php

示例7: __construct

 /**
  * Constructs a const fetch node.
  *
  * @param Name  $name       Constant name
  * @param array $attributes Additional attributes
  */
 public function __construct(Name $name, array $attributes = array())
 {
     parent::__construct(array('name' => $name), $attributes);
 }
開發者ID:Ingothq,項目名稱:multiarmedbandit,代碼行數:10,代碼來源:ConstFetch.php

示例8: __construct

 /**
  * Constructs an "yield from" node.
  *
  * @param Expr $expr Expression
  * @param array $attributes Additional attributes
  */
 public function __construct(Expr $expr, array $attributes = array())
 {
     parent::__construct($attributes);
     $this->expr = $expr;
 }
開發者ID:JesseDarellMoore,項目名稱:CS499,代碼行數:11,代碼來源:YieldFrom.php

示例9: __construct

 /**
  * Constructs an array node.
  *
  * @param ArrayItem[] $items      Items of the array
  * @param array       $attributes Additional attributes
  */
 public function __construct(array $items = array(), array $attributes = array())
 {
     parent::__construct(array('items' => $items), $attributes);
 }
開發者ID:Ingothq,項目名稱:multiarmedbandit,代碼行數:10,代碼來源:Array_.php

示例10: __construct

 /**
  * Constructs a shell exec (backtick) node.
  *
  * @param array $parts Encapsed string array
  * @param array $attributes Additional attributes
  */
 public function __construct(array $parts, array $attributes = array())
 {
     parent::__construct($attributes);
     $this->parts = $parts;
 }
開發者ID:JesseDarellMoore,項目名稱:CS499,代碼行數:11,代碼來源:ShellExec.php

示例11: __construct

 /**
  * Constructs a bitwise and node.
  *
  * @param Expr $left The left hand side expression
  * @param Expr $right The right hand side expression
  * @param array $attributes Additional attributes
  */
 public function __construct(Expr $left, Expr $right, array $attributes = array())
 {
     parent::__construct($attributes);
     $this->left = $left;
     $this->right = $right;
 }
開發者ID:JesseDarellMoore,項目名稱:CS499,代碼行數:13,代碼來源:BinaryOp.php

示例12: __construct

 /**
  * Constructs an array node.
  *
  * @param Expr[] $vars       Variables
  * @param array  $attributes Additional attributes
  */
 public function __construct(array $vars, array $attributes = array())
 {
     parent::__construct(array('vars' => $vars), $attributes);
 }
開發者ID:Ingothq,項目名稱:multiarmedbandit,代碼行數:10,代碼來源:Isset_.php

示例13: __construct

 /**
  * Constructs an include node.
  *
  * @param Expr  $expr       Expression
  * @param int   $type       Type of include
  * @param array $attributes Additional attributes
  */
 public function __construct(Expr $expr, $type, array $attributes = array())
 {
     parent::__construct(array('expr' => $expr, 'type' => $type), $attributes);
 }
開發者ID:Ingothq,項目名稱:multiarmedbandit,代碼行數:11,代碼來源:Include_.php

示例14: __construct

 /**
  * Constructs a yield expression node.
  *
  * @param null|Expr $value      Value expression
  * @param null|Expr $key        Key expression
  * @param array     $attributes Additional attributes
  */
 public function __construct(Expr $value = null, Expr $key = null, array $attributes = array())
 {
     parent::__construct(null, $attributes);
     $this->key = $key;
     $this->value = $value;
 }
開發者ID:EnmanuelCode,項目名稱:backend-laravel,代碼行數:13,代碼來源:Yield_.php

示例15: __construct

 /**
  * Constructs an array index fetch node.
  *
  * @param Expr      $var        Variable
  * @param null|Expr $dim        Array index / dim
  * @param array     $attributes Additional attributes
  */
 public function __construct(Expr $var, Expr $dim = null, array $attributes = array())
 {
     parent::__construct($attributes);
     $this->var = $var;
     $this->dim = $dim;
 }
開發者ID:qasem2rubik,項目名稱:laravel,代碼行數:13,代碼來源:ArrayDimFetch.php


注:本文中的PhpParser\Node\Expr::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。