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

Breadcrumb

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

function Alias::__construct

Same name in this branch
  1. 11.1.x vendor/symfony/routing/Alias.php \Symfony\Component\Routing\Alias::__construct()
  2. 11.1.x vendor/symfony/dependency-injection/Alias.php \Symfony\Component\DependencyInjection\Alias::__construct()

Constructs a trait use precedence adaptation node.

Parameters

null|Node\Name $trait Trait name:

string|Node\Identifier $method Method name:

null|int $newModifier New modifier:

null|string|Node\Identifier $newName New name:

array<string, mixed> $attributes Additional attributes:

File

vendor/nikic/php-parser/lib/PhpParser/Node/Stmt/TraitUseAdaptation/Alias.php, line 22

Class

Alias

Namespace

PhpParser\Node\Stmt\TraitUseAdaptation

Code

public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) {
    $this->attributes = $attributes;
    $this->trait = $trait;
    $this->method = \is_string($method) ? new Node\Identifier($method) : $method;
    $this->newModifier = $newModifier;
    $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName;
}

API Navigation

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