Mercurial > hg > isophonics-drupal-site
annotate vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.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\Stmt; |
Chris@0 | 4 |
Chris@0 | 5 use PhpParser\Node; |
Chris@13 | 6 use PhpParser\Node\Expr; |
Chris@0 | 7 |
Chris@0 | 8 class Catch_ extends Node\Stmt |
Chris@0 | 9 { |
Chris@0 | 10 /** @var Node\Name[] Types of exceptions to catch */ |
Chris@0 | 11 public $types; |
Chris@13 | 12 /** @var Expr\Variable Variable for exception */ |
Chris@0 | 13 public $var; |
Chris@13 | 14 /** @var Node\Stmt[] Statements */ |
Chris@0 | 15 public $stmts; |
Chris@0 | 16 |
Chris@0 | 17 /** |
Chris@0 | 18 * Constructs a catch node. |
Chris@0 | 19 * |
Chris@13 | 20 * @param Node\Name[] $types Types of exceptions to catch |
Chris@13 | 21 * @param Expr\Variable $var Variable for exception |
Chris@13 | 22 * @param Node\Stmt[] $stmts Statements |
Chris@13 | 23 * @param array $attributes Additional attributes |
Chris@0 | 24 */ |
Chris@13 | 25 public function __construct( |
Chris@13 | 26 array $types, Expr\Variable $var, array $stmts = [], array $attributes = [] |
Chris@13 | 27 ) { |
Chris@0 | 28 parent::__construct($attributes); |
Chris@0 | 29 $this->types = $types; |
Chris@0 | 30 $this->var = $var; |
Chris@0 | 31 $this->stmts = $stmts; |
Chris@0 | 32 } |
Chris@0 | 33 |
Chris@13 | 34 public function getSubNodeNames() : array { |
Chris@13 | 35 return ['types', 'var', 'stmts']; |
Chris@13 | 36 } |
Chris@13 | 37 |
Chris@13 | 38 public function getType() : string { |
Chris@13 | 39 return 'Stmt_Catch'; |
Chris@0 | 40 } |
Chris@0 | 41 } |