Include.php 829 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. /**
  3. * @property PHPParser_Node_Expr $expr Expression
  4. * @property int $type Type of include
  5. */
  6. class PHPParser_Node_Expr_Include extends PHPParser_Node_Expr
  7. {
  8. const TYPE_INCLUDE = 1;
  9. const TYPE_INCLUDE_ONCE = 2;
  10. const TYPE_REQUIRE = 3;
  11. const TYPE_REQUIRE_ONCE = 4;
  12. /**
  13. * Constructs an include node.
  14. *
  15. * @param PHPParser_Node_Expr $expr Expression
  16. * @param int $type Type of include
  17. * @param array $attributes Additional attributes
  18. */
  19. public function __construct(PHPParser_Node_Expr $expr, $type, array $attributes = array()) {
  20. parent::__construct(
  21. array(
  22. 'expr' => $expr,
  23. 'type' => $type
  24. ),
  25. $attributes
  26. );
  27. }
  28. }