Mercurial > hg > cmmr2012-drupal-site
annotate vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Namespace_.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php declare(strict_types=1); |
Chris@0 | 2 |
Chris@0 | 3 namespace PhpParser\Node\Stmt; |
Chris@0 | 4 |
Chris@0 | 5 use PhpParser\Node; |
Chris@0 | 6 |
Chris@0 | 7 class Namespace_ extends Node\Stmt |
Chris@0 | 8 { |
Chris@0 | 9 /* For use in the "kind" attribute */ |
Chris@0 | 10 const KIND_SEMICOLON = 1; |
Chris@0 | 11 const KIND_BRACED = 2; |
Chris@0 | 12 |
Chris@0 | 13 /** @var null|Node\Name Name */ |
Chris@0 | 14 public $name; |
Chris@0 | 15 /** @var Node\Stmt[] Statements */ |
Chris@0 | 16 public $stmts; |
Chris@0 | 17 |
Chris@0 | 18 /** |
Chris@0 | 19 * Constructs a namespace node. |
Chris@0 | 20 * |
Chris@0 | 21 * @param null|Node\Name $name Name |
Chris@0 | 22 * @param null|Node\Stmt[] $stmts Statements |
Chris@0 | 23 * @param array $attributes Additional attributes |
Chris@0 | 24 */ |
Chris@0 | 25 public function __construct(Node\Name $name = null, $stmts = [], array $attributes = []) { |
Chris@0 | 26 parent::__construct($attributes); |
Chris@0 | 27 $this->name = $name; |
Chris@0 | 28 $this->stmts = $stmts; |
Chris@0 | 29 } |
Chris@0 | 30 |
Chris@0 | 31 public function getSubNodeNames() : array { |
Chris@0 | 32 return ['name', 'stmts']; |
Chris@0 | 33 } |
Chris@0 | 34 |
Chris@0 | 35 public function getType() : string { |
Chris@0 | 36 return 'Stmt_Namespace'; |
Chris@0 | 37 } |
Chris@0 | 38 } |