function Param::__construct
Same name in this branch
- 11.1.x vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php \PhpParser\Builder\Param::__construct()
- 11.1.x vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Param.php \phpDocumentor\Reflection\DocBlock\Tags\Param::__construct()
Constructs a parameter node.
Parameters
Expr\Variable|Expr\Error $var Parameter variable:
null|Expr $default Default value:
null|Identifier|Name|ComplexType $type Type declaration:
bool $byRef Whether is passed by reference:
bool $variadic Whether this is a variadic argument:
array<string, mixed> $attributes Additional attributes:
int $flags Optional visibility flags:
list<AttributeGroup> $attrGroups PHP attribute groups:
PropertyHook[] $hooks Property hooks for promoted properties:
Overrides NodeAbstract::__construct
File
-
vendor/
nikic/ php-parser/ lib/ PhpParser/ Node/ Param.php, line 40
Class
Namespace
PhpParser\NodeCode
public function __construct(Expr $var, ?Expr $default = null, ?Node $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [], int $flags = 0, array $attrGroups = [], array $hooks = []) {
$this->attributes = $attributes;
$this->type = $type;
$this->byRef = $byRef;
$this->variadic = $variadic;
$this->var = $var;
$this->default = $default;
$this->flags = $flags;
$this->attrGroups = $attrGroups;
$this->hooks = $hooks;
}