Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Param.php

function Param::__construct

Same name in this branch
  1. 11.1.x vendor/nikic/php-parser/lib/PhpParser/Builder/Param.php \PhpParser\Builder\Param::__construct()
  2. 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

Param

Namespace

PhpParser\Node

Code

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;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal