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

Breadcrumb

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

function Link::__construct

Same name in this branch
  1. 11.1.x vendor/open-telemetry/sdk/Trace/Link.php \OpenTelemetry\SDK\Trace\Link::__construct()
  2. 11.1.x vendor/open-telemetry/gen-otlp-protobuf/Opentelemetry/Proto/Trace/V1/Span/Link.php \Opentelemetry\Proto\Trace\V1\Span\Link::__construct()
  3. 11.1.x vendor/phpdocumentor/reflection-docblock/src/DocBlock/Tags/Link.php \phpDocumentor\Reflection\DocBlock\Tags\Link::__construct()
  4. 11.1.x core/lib/Drupal/Core/Link.php \Drupal\Core\Link::__construct()
  5. 11.1.x core/modules/jsonapi/src/JsonApiResource/Link.php \Drupal\jsonapi\JsonApiResource\Link::__construct()

Creates a new package link.

Parameters

ConstraintInterface $constraint Constraint applying to the target of this link:

self::TYPE_* $description Used to create a descriptive string representation:

File

vendor/composer/composer/src/Composer/Package/Link.php, line 85

Class

Link
Represents a link between two packages, represented by their names

Namespace

Composer\Package

Code

public function __construct(string $source, string $target, ConstraintInterface $constraint, $description = self::TYPE_UNKNOWN, ?string $prettyConstraint = null) {
    $this->source = strtolower($source);
    $this->target = strtolower($target);
    $this->constraint = $constraint;
    $this->description = self::TYPE_DEV_REQUIRE === $description ? 'requires (for development)' : $description;
    $this->prettyConstraint = $prettyConstraint;
}
RSS feed
Powered by Drupal