Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/lib/PhpParser/Node/Expr/StaticPropertyFetch.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\Expr; |
Chris@0 | 6 use PhpParser\Node\Name; |
Chris@13 | 7 use PhpParser\Node\VarLikeIdentifier; |
Chris@0 | 8 |
Chris@0 | 9 class StaticPropertyFetch extends Expr |
Chris@0 | 10 { |
Chris@0 | 11 /** @var Name|Expr Class name */ |
Chris@0 | 12 public $class; |
Chris@13 | 13 /** @var VarLikeIdentifier|Expr Property name */ |
Chris@0 | 14 public $name; |
Chris@0 | 15 |
Chris@0 | 16 /** |
Chris@0 | 17 * Constructs a static property fetch node. |
Chris@0 | 18 * |
Chris@13 | 19 * @param Name|Expr $class Class name |
Chris@13 | 20 * @param string|VarLikeIdentifier|Expr $name Property name |
Chris@13 | 21 * @param array $attributes Additional attributes |
Chris@0 | 22 */ |
Chris@13 | 23 public function __construct($class, $name, array $attributes = []) { |
Chris@0 | 24 parent::__construct($attributes); |
Chris@0 | 25 $this->class = $class; |
Chris@13 | 26 $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; |
Chris@0 | 27 } |
Chris@0 | 28 |
Chris@13 | 29 public function getSubNodeNames() : array { |
Chris@13 | 30 return ['class', 'name']; |
Chris@13 | 31 } |
Chris@13 | 32 |
Chris@13 | 33 public function getType() : string { |
Chris@13 | 34 return 'Expr_StaticPropertyFetch'; |
Chris@0 | 35 } |
Chris@0 | 36 } |