the whole shebang
This commit is contained in:
1 parent
7f74c0613e
commit
ab1334c0cf
3686 files changed
+496409
-1
No files matched your search
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* @property PHPParser_Node[] $stmts Statements
|
||||
* @property PHPParser_Node_Stmt_Catch[] $catches Catches
|
||||
* @property PHPParser_Node[] $finallyStmts Finally statements
|
||||
*/
|
||||
class PHPParser_Node_Stmt_TryCatch extends PHPParser_Node_Stmt
|
||||
{
|
||||
/**
|
||||
* Constructs a try catch node.
|
||||
*
|
||||
* @param PHPParser_Node[] $stmts Statements
|
||||
* @param PHPParser_Node_Stmt_Catch[] $catches Catches
|
||||
* @param PHPParser_Node[] $finallyStmts Finally statements (null means no finally clause)
|
||||
* @param array|null $attributes Additional attributes
|
||||
*/
|
||||
public function __construct(array $stmts, array $catches, array $finallyStmts = null, array $attributes = array()) {
|
||||
if (empty($catches) && null === $finallyStmts) {
|
||||
throw new PHPParser_Error('Cannot use try without catch or finally');
|
||||
}
|
||||
|
||||
parent::__construct(
|
||||
array(
|
||||
'stmts' => $stmts,
|
||||
'catches' => $catches,
|
||||
'finallyStmts' => $finallyStmts,
|
||||
),
|
||||
$attributes
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user