HaltCompiler.php 754 B

123456789101112131415161718192021222324252627282930
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Stmt;
  3. use PhpParser\Node\Stmt;
  4. class HaltCompiler extends Stmt
  5. {
  6. /** @var string Remaining text after halt compiler statement. */
  7. public $remaining;
  8. /**
  9. * Constructs a __halt_compiler node.
  10. *
  11. * @param string $remaining Remaining text after halt compiler statement.
  12. * @param array $attributes Additional attributes
  13. */
  14. public function __construct(string $remaining, array $attributes = []) {
  15. $this->attributes = $attributes;
  16. $this->remaining = $remaining;
  17. }
  18. public function getSubNodeNames() : array {
  19. return ['remaining'];
  20. }
  21. public function getType() : string {
  22. return 'Stmt_HaltCompiler';
  23. }
  24. }