mirror of
https://github.com/phabelio/PHP-Parser.git
synced 2024-12-12 17:17:31 +01:00
25f37ccc28
The term "closure" is more commonly used in PHP, even if the function doesn't use() any variables.
26 lines
731 B
PHP
26 lines
731 B
PHP
<?php
|
|
|
|
/**
|
|
* @property string $var Name of variable
|
|
* @property bool $byRef Whether to use by reference
|
|
*/
|
|
class PHPParser_Node_Expr_ClosureUse extends PHPParser_Node_Expr
|
|
{
|
|
/**
|
|
* 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
|
|
);
|
|
}
|
|
} |