No Description

Include_.php 920B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php declare(strict_types=1);
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. class Include_ extends Expr
  5. {
  6. const TYPE_INCLUDE = 1;
  7. const TYPE_INCLUDE_ONCE = 2;
  8. const TYPE_REQUIRE = 3;
  9. const TYPE_REQUIRE_ONCE = 4;
  10. /** @var Expr Expression */
  11. public $expr;
  12. /** @var int Type of include */
  13. public $type;
  14. /**
  15. * Constructs an include node.
  16. *
  17. * @param Expr $expr Expression
  18. * @param int $type Type of include
  19. * @param array $attributes Additional attributes
  20. */
  21. public function __construct(Expr $expr, int $type, array $attributes = []) {
  22. $this->attributes = $attributes;
  23. $this->expr = $expr;
  24. $this->type = $type;
  25. }
  26. public function getSubNodeNames() : array {
  27. return ['expr', 'type'];
  28. }
  29. public function getType() : string {
  30. return 'Expr_Include';
  31. }
  32. }