No Description

Catch_.php 835B

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