3 namespace PhpParser\Node\Expr;
5 use PhpParser\Node\Expr;
7 class ClosureUse extends Expr
9 /** @var string Name of variable */
11 /** @var bool Whether to use by reference */
15 * Constructs a closure use node.
17 * @param string $var Name of variable
18 * @param bool $byRef Whether to use by reference
19 * @param array $attributes Additional attributes
21 public function __construct($var, $byRef = false, array $attributes = array()) {
22 parent::__construct($attributes);
24 $this->byRef = $byRef;
27 public function getSubNodeNames() {
28 return array('var', 'byRef');