2011-05-27 18:20:44 +02:00
|
|
|
<?php
|
|
|
|
|
2011-05-29 12:20:47 +02:00
|
|
|
/**
|
|
|
|
* @property string $var Name of variable
|
|
|
|
* @property bool $byRef Whether to use by reference
|
|
|
|
*/
|
2011-10-26 18:34:12 +02:00
|
|
|
class PHPParser_Node_Expr_ClosureUse extends PHPParser_Node_Expr
|
2011-05-27 18:20:44 +02:00
|
|
|
{
|
2011-08-11 10:25:51 +02:00
|
|
|
/**
|
|
|
|
* Constructs a closure use node.
|
|
|
|
*
|
|
|
|
* @param string $var Name of variable
|
|
|
|
* @param bool $byRef Whether to use by reference
|
|
|
|
* @param int $line Line
|
|
|
|
* @param null|string $docComment Nearest doc comment
|
|
|
|
*/
|
|
|
|
public function __construct($var, $byRef = false, $line = -1, $docComment = null) {
|
|
|
|
parent::__construct(
|
|
|
|
array(
|
|
|
|
'var' => $var,
|
|
|
|
'byRef' => $byRef
|
|
|
|
),
|
|
|
|
$line, $docComment
|
|
|
|
);
|
|
|
|
}
|
2011-05-27 18:20:44 +02:00
|
|
|
}
|