function Dependency::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::__construct()
  2. 10 core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::__construct()
  3. 11.x core/lib/Drupal/Core/Extension/Dependency.php \Drupal\Core\Extension\Dependency::__construct()

Dependency constructor.

Parameters

string $name: The name of the dependency.

string $project: The project namespace for the dependency.

string $constraint: The constraint string. For example, '>8.x-1.1'.

File

core/lib/Drupal/Core/Extension/Dependency.php, line 55

Class

Dependency
A value object representing dependency information.

Namespace

Drupal\Core\Extension

Code

public function __construct($name, $project, $constraint) {
    $this->name = $name;
    $this->project = $project;
    $this->constraintString = $constraint;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.