AssignRef.php 837 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. namespace PhpParser\Node\Expr;
  3. use PhpParser\Node\Expr;
  4. /**
  5. * @property Expr $var Variable reference is assigned to
  6. * @property Expr $expr Variable which is referenced
  7. */
  8. class AssignRef extends Expr
  9. {
  10. /** @var Expr Variable reference is assigned to */
  11. public $var;
  12. /** @var Expr Variable which is referenced */
  13. public $expr;
  14. /**
  15. * Constructs an assignment node.
  16. *
  17. * @param Expr $var Variable
  18. * @param Expr $expr Expression
  19. * @param array $attributes Additional attributes
  20. */
  21. public function __construct(Expr $var, Expr $expr, array $attributes = array()) {
  22. parent::__construct(null, $attributes);
  23. $this->var = $var;
  24. $this->expr = $expr;
  25. }
  26. public function getSubNodeNames() {
  27. return array('var', 'expr');
  28. }
  29. }