No Description

Exit_.php 753B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. class Exit_ extends Expr
  5. {
  6. /* For use in "kind" attribute */
  7. const KIND_EXIT = 1;
  8. const KIND_DIE = 2;
  9. /** @var null|Expr Expression */
  10. public $expr;
  11. /**
  12. * Constructs an exit() node.
  13. *
  14. * @param null|Expr $expr Expression
  15. * @param array $attributes Additional attributes
  16. */
  17. public function __construct(Expr $expr = null, array $attributes = []) {
  18. $this->attributes = $attributes;
  19. $this->expr = $expr;
  20. }
  21. public function getSubNodeNames() : array {
  22. return ['expr'];
  23. }
  24. public function getType() : string {
  25. return 'Expr_Exit';
  26. }
  27. }