Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/lib/PhpParser/Node/Expr/MethodCall.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 5fb285c0d0e3 |
children |
rev | line source |
---|---|
Chris@13 | 1 <?php declare(strict_types=1); |
Chris@0 | 2 |
Chris@0 | 3 namespace PhpParser\Node\Expr; |
Chris@0 | 4 |
Chris@0 | 5 use PhpParser\Node\Arg; |
Chris@0 | 6 use PhpParser\Node\Expr; |
Chris@13 | 7 use PhpParser\Node\Identifier; |
Chris@0 | 8 |
Chris@0 | 9 class MethodCall extends Expr |
Chris@0 | 10 { |
Chris@0 | 11 /** @var Expr Variable holding object */ |
Chris@0 | 12 public $var; |
Chris@13 | 13 /** @var Identifier|Expr Method name */ |
Chris@0 | 14 public $name; |
Chris@0 | 15 /** @var Arg[] Arguments */ |
Chris@0 | 16 public $args; |
Chris@0 | 17 |
Chris@0 | 18 /** |
Chris@0 | 19 * Constructs a function call node. |
Chris@0 | 20 * |
Chris@13 | 21 * @param Expr $var Variable holding object |
Chris@13 | 22 * @param string|Identifier|Expr $name Method name |
Chris@13 | 23 * @param Arg[] $args Arguments |
Chris@13 | 24 * @param array $attributes Additional attributes |
Chris@0 | 25 */ |
Chris@13 | 26 public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { |
Chris@0 | 27 parent::__construct($attributes); |
Chris@0 | 28 $this->var = $var; |
Chris@13 | 29 $this->name = \is_string($name) ? new Identifier($name) : $name; |
Chris@0 | 30 $this->args = $args; |
Chris@0 | 31 } |
Chris@0 | 32 |
Chris@13 | 33 public function getSubNodeNames() : array { |
Chris@13 | 34 return ['var', 'name', 'args']; |
Chris@13 | 35 } |
Chris@13 | 36 |
Chris@13 | 37 public function getType() : string { |
Chris@13 | 38 return 'Expr_MethodCall'; |
Chris@0 | 39 } |
Chris@0 | 40 } |