コード例 #1
0
ファイル: StaticCall.php プロジェクト: JesseDarellMoore/CS499
 /**
  * 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;
 }
コード例 #2
0
ファイル: ArrayItem.php プロジェクト: JesseDarellMoore/CS499
 /**
  * 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;
 }
コード例 #3
0
ファイル: Ternary.php プロジェクト: fakrunt/itmarkerz
 /**
  * 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;
 }
コード例 #4
0
 /**
  * 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;
 }
コード例 #5
0
ファイル: Closure.php プロジェクト: nikic/PHP-Parser
 /**
  * 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();
 }
コード例 #6
0
 /**
  * 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);
 }
コード例 #7
0
 /**
  * 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);
 }
コード例 #8
0
ファイル: YieldFrom.php プロジェクト: JesseDarellMoore/CS499
 /**
  * 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;
 }
コード例 #9
0
ファイル: Array_.php プロジェクト: Ingothq/multiarmedbandit
 /**
  * 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);
 }
コード例 #10
0
ファイル: ShellExec.php プロジェクト: JesseDarellMoore/CS499
 /**
  * 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;
 }
コード例 #11
0
ファイル: BinaryOp.php プロジェクト: JesseDarellMoore/CS499
 /**
  * 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;
 }
コード例 #12
0
ファイル: Isset_.php プロジェクト: Ingothq/multiarmedbandit
 /**
  * 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);
 }
コード例 #13
0
ファイル: Include_.php プロジェクト: Ingothq/multiarmedbandit
 /**
  * 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);
 }
コード例 #14
0
 /**
  * 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;
 }
コード例 #15
0
ファイル: ArrayDimFetch.php プロジェクト: qasem2rubik/laravel
 /**
  * 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;
 }
コード例 #16
0
 /**
  * Constructs a closure use node.
  *
  * @param string      $var        Name of variable
  * @param bool        $byRef      Whether to use by reference
  * @param array       $attributes Additional attributes
  */
 public function __construct($var, $byRef = false, array $attributes = array())
 {
     parent::__construct(null, $attributes);
     $this->var = $var;
     $this->byRef = $byRef;
 }
コード例 #17
0
ファイル: Error.php プロジェクト: nikic/php-parser
 /**
  * Constructs an error node.
  *
  * @param array $attributes Additional attributes
  */
 public function __construct(array $attributes = array())
 {
     parent::__construct($attributes);
 }
コード例 #18
0
 /**
  * Constructs an instanceof check node.
  *
  * @param Expr      $expr       Expression
  * @param Name|Expr $class      Class name
  * @param array     $attributes Additional attributes
  */
 public function __construct(Expr $expr, $class, array $attributes = array())
 {
     parent::__construct(null, $attributes);
     $this->expr = $expr;
     $this->class = $class;
 }
コード例 #19
0
 /**
  * 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(array('key' => $key, 'value' => $value, 'byRef' => $byRef), $attributes);
 }
コード例 #20
0
 /**
  * Constructs an instanceof check node.
  *
  * @param Expr      $expr       Expression
  * @param Name|Expr $class      Class name
  * @param array     $attributes Additional attributes
  */
 public function __construct(Expr $expr, $class, array $attributes = array())
 {
     parent::__construct(array('expr' => $expr, 'class' => $class), $attributes);
 }
コード例 #21
0
 /**
  * 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(null, $attributes);
     $this->items = $items;
 }
コード例 #22
0
ファイル: Assign.php プロジェクト: samj1912/repo
 /**
  * Constructs an assignment node.
  *
  * @param Expr  $var        Variable
  * @param Expr  $expr       Expression
  * @param array $attributes Additional attributes
  */
 public function __construct(Expr $var, Expr $expr, array $attributes = array())
 {
     parent::__construct(array('var' => $var, 'expr' => $expr), $attributes);
 }
コード例 #23
0
 /**
  * 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(null, $attributes);
     $this->expr = $expr;
     $this->type = $type;
 }
コード例 #24
0
 /**
  * Constructs a closure use node.
  *
  * @param string      $var        Name of variable
  * @param bool        $byRef      Whether to use by reference
  * @param array       $attributes Additional attributes
  */
 public function __construct($var, $byRef = false, array $attributes = array())
 {
     parent::__construct(array('var' => $var, 'byRef' => $byRef), $attributes);
 }
コード例 #25
0
 /**
  * Constructs a variable node.
  *
  * @param string|Expr $name       Name
  * @param array                      $attributes Additional attributes
  */
 public function __construct($name, array $attributes = array())
 {
     parent::__construct(null, $attributes);
     $this->name = $name;
 }
コード例 #26
0
ファイル: New_.php プロジェクト: zqcloveping/pagekit
 /**
  * Constructs a function call node.
  *
  * @param Node\Name|Expr $class      Class name
  * @param Node\Arg[]     $args       Arguments
  * @param array          $attributes Additional attributes
  */
 public function __construct($class, array $args = array(), array $attributes = array())
 {
     parent::__construct(null, $attributes);
     $this->class = $class;
     $this->args = $args;
 }
コード例 #27
0
ファイル: PostInc.php プロジェクト: ngitimfoyo/Nyari-AppPHP
 /**
  * Constructs a post increment node.
  *
  * @param Expr $var
  *        	Variable
  * @param array $attributes
  *        	Additional attributes
  */
 public function __construct(Expr $var, array $attributes = array())
 {
     parent::__construct(null, $attributes);
     $this->var = $var;
 }
コード例 #28
0
 /**
  * Constructs a function call node.
  *
  * @param Expr        $var        Variable holding object
  * @param string|Expr $name       Property name
  * @param array       $attributes Additional attributes
  */
 public function __construct(Expr $var, $name, array $attributes = array())
 {
     parent::__construct(array('var' => $var, 'name' => $name), $attributes);
 }
コード例 #29
0
ファイル: Isset_.php プロジェクト: ngitimfoyo/Nyari-AppPHP
 /**
  * Constructs an array node.
  *
  * @param Expr[] $vars
  *        	Variables
  * @param array $attributes
  *        	Additional attributes
  */
 public function __construct(array $vars, array $attributes = array())
 {
     parent::__construct(null, $attributes);
     $this->vars = $vars;
 }
コード例 #30
0
ファイル: Yield_.php プロジェクト: samj1912/repo
 /**
  * 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(array('key' => $key, 'value' => $value), $attributes);
 }