Mercurial > hg > cmmr2012-drupal-site
comparison vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/Catch_.php @ 0:c75dbcec494b
Initial commit from drush-created site
author | Chris Cannam |
---|---|
date | Thu, 05 Jul 2018 14:24:15 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:c75dbcec494b |
---|---|
1 <?php declare(strict_types=1); | |
2 | |
3 namespace PhpParser\Node\Stmt; | |
4 | |
5 use PhpParser\Node; | |
6 use PhpParser\Node\Expr; | |
7 | |
8 class Catch_ extends Node\Stmt | |
9 { | |
10 /** @var Node\Name[] Types of exceptions to catch */ | |
11 public $types; | |
12 /** @var Expr\Variable Variable for exception */ | |
13 public $var; | |
14 /** @var Node\Stmt[] Statements */ | |
15 public $stmts; | |
16 | |
17 /** | |
18 * Constructs a catch node. | |
19 * | |
20 * @param Node\Name[] $types Types of exceptions to catch | |
21 * @param Expr\Variable $var Variable for exception | |
22 * @param Node\Stmt[] $stmts Statements | |
23 * @param array $attributes Additional attributes | |
24 */ | |
25 public function __construct( | |
26 array $types, Expr\Variable $var, array $stmts = [], array $attributes = [] | |
27 ) { | |
28 parent::__construct($attributes); | |
29 $this->types = $types; | |
30 $this->var = $var; | |
31 $this->stmts = $stmts; | |
32 } | |
33 | |
34 public function getSubNodeNames() : array { | |
35 return ['types', 'var', 'stmts']; | |
36 } | |
37 | |
38 public function getType() : string { | |
39 return 'Stmt_Catch'; | |
40 } | |
41 } |