菜谱项目

Instanceof_.php 728B

1234567891011121314151617181920212223242526272829303132
  1. <?php
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. use PhpParser\Node\Name;
  5. class Instanceof_ extends Expr
  6. {
  7. /** @var Expr Expression */
  8. public $expr;
  9. /** @var Name|Expr Class name */
  10. public $class;
  11. /**
  12. * Constructs an instanceof check node.
  13. *
  14. * @param Expr $expr Expression
  15. * @param Name|Expr $class Class name
  16. * @param array $attributes Additional attributes
  17. */
  18. public function __construct(Expr $expr, $class, array $attributes = array()) {
  19. parent::__construct($attributes);
  20. $this->expr = $expr;
  21. $this->class = $class;
  22. }
  23. public function getSubNodeNames() {
  24. return array('expr', 'class');
  25. }
  26. }