No Description

Include_.php 766B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. /**
  5. * @property Expr $expr Expression
  6. * @property int $type Type of include
  7. */
  8. class Include_ extends Expr
  9. {
  10. const TYPE_INCLUDE = 1;
  11. const TYPE_INCLUDE_ONCE = 2;
  12. const TYPE_REQUIRE = 3;
  13. const TYPE_REQUIRE_ONCE = 4;
  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, $type, array $attributes = array()) {
  22. parent::__construct(
  23. array(
  24. 'expr' => $expr,
  25. 'type' => $type
  26. ),
  27. $attributes
  28. );
  29. }
  30. }