No Description

ClosureUse.php 703B

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