Catch.php 891 B

12345678910111213141516171819202122232425262728
  1. <?php
  2. /**
  3. * @property PHPParser_Node_Name $type Class of exception
  4. * @property string $var Variable for exception
  5. * @property PHPParser_Node[] $stmts Statements
  6. */
  7. class PHPParser_Node_Stmt_Catch extends PHPParser_Node_Stmt
  8. {
  9. /**
  10. * Constructs a catch node.
  11. *
  12. * @param PHPParser_Node_Name $type Class of exception
  13. * @param string $var Variable for exception
  14. * @param PHPParser_Node[] $stmts Statements
  15. * @param array $attributes Additional attributes
  16. */
  17. public function __construct(PHPParser_Node_Name $type, $var, array $stmts = array(), array $attributes = array()) {
  18. parent::__construct(
  19. array(
  20. 'type' => $type,
  21. 'var' => $var,
  22. 'stmts' => $stmts,
  23. ),
  24. $attributes
  25. );
  26. }
  27. }