ClosureUse.php 680 B

12345678910111213141516171819202122232425
  1. <?php
  2. /**
  3. * @property string $var Name of variable
  4. * @property bool $byRef Whether to use by reference
  5. */
  6. class PHPParser_Node_Expr_ClosureUse extends PHPParser_Node_Expr
  7. {
  8. /**
  9. * Constructs a closure use node.
  10. *
  11. * @param string $var Name of variable
  12. * @param bool $byRef Whether to use by reference
  13. * @param array $attributes Additional attributes
  14. */
  15. public function __construct($var, $byRef = false, array $attributes = array()) {
  16. parent::__construct(
  17. array(
  18. 'var' => $var,
  19. 'byRef' => $byRef
  20. ),
  21. $attributes
  22. );
  23. }
  24. }