Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Case_.php @ 1:1a348b17ec81
Logo and header background
author | Chris Cannam |
---|---|
date | Thu, 30 Nov 2017 14:56:35 +0000 |
parents | 4c8ae668cc8c |
children | 5fb285c0d0e3 |
rev | line source |
---|---|
Chris@0 | 1 <?php |
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 Case_ extends Node\Stmt |
Chris@0 | 8 { |
Chris@0 | 9 /** @var null|Node\Expr $cond Condition (null for default) */ |
Chris@0 | 10 public $cond; |
Chris@0 | 11 /** @var Node[] Statements */ |
Chris@0 | 12 public $stmts; |
Chris@0 | 13 |
Chris@0 | 14 /** |
Chris@0 | 15 * Constructs a case node. |
Chris@0 | 16 * |
Chris@0 | 17 * @param null|Node\Expr $cond Condition (null for default) |
Chris@0 | 18 * @param Node[] $stmts Statements |
Chris@0 | 19 * @param array $attributes Additional attributes |
Chris@0 | 20 */ |
Chris@0 | 21 public function __construct($cond, array $stmts = array(), array $attributes = array()) { |
Chris@0 | 22 parent::__construct($attributes); |
Chris@0 | 23 $this->cond = $cond; |
Chris@0 | 24 $this->stmts = $stmts; |
Chris@0 | 25 } |
Chris@0 | 26 |
Chris@0 | 27 public function getSubNodeNames() { |
Chris@0 | 28 return array('cond', 'stmts'); |
Chris@0 | 29 } |
Chris@0 | 30 } |