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

Breadcrumb

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

function ArrowFunction::__construct

Parameters

array{: expr: Expr, static?: bool, byRef?: bool, params?: Node\Param[], returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, attrGroups?: Node\AttributeGroup[] } $subNodes Array of the following subnodes: 'expr' : Expression body 'static' => false : Whether the closure is static 'byRef' => false : Whether to return by reference 'params' => array() : Parameters 'returnType' => null : Return type 'attrGroups' => array() : PHP attribute groups

array<string, mixed> $attributes Additional attributes:

File

vendor/nikic/php-parser/lib/PhpParser/Node/Expr/ArrowFunction.php, line 44

Class

ArrowFunction

Namespace

PhpParser\Node\Expr

Code

public function __construct(array $subNodes, array $attributes = []) {
    $this->attributes = $attributes;
    $this->static = $subNodes['static'] ?? false;
    $this->byRef = $subNodes['byRef'] ?? false;
    $this->params = $subNodes['params'] ?? [];
    $this->returnType = $subNodes['returnType'] ?? null;
    $this->expr = $subNodes['expr'];
    $this->attrGroups = $subNodes['attrGroups'] ?? [];
}

API Navigation

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