菜谱项目

Include_.php 811B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  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, $type, array $attributes = array()) {
  22. parent::__construct($attributes);
  23. $this->expr = $expr;
  24. $this->type = $type;
  25. }
  26. public function getSubNodeNames() {
  27. return array('expr', 'type');
  28. }
  29. }