\Composer\PackageLink

Represents a link between two packages, represented by their names

Summary

Methods
Properties
Constants
__construct()
getDescription()
getSource()
getTarget()
getConstraint()
getPrettyConstraint()
__toString()
getPrettyString()
No public properties found
No constants found
No protected methods found
$source
$target
$constraint
$description
$prettyConstraint
N/A
No private methods found
No private properties found
N/A

Properties

$source

$source : string

Type

string

$target

$target : string

Type

string

$description

$description : string

Type

string

$prettyConstraint

$prettyConstraint : string|null

Type

string|null

Methods

__construct()

__construct(string  $source, string  $target, \Composer\Semver\Constraint\ConstraintInterface|null  $constraint = null, string  $description = 'relates to', string|null  $prettyConstraint = null) 

Creates a new package link.

Parameters

string $source
string $target
\Composer\Semver\Constraint\ConstraintInterface|null $constraint

Constraint applying to the target of this link

string $description

Used to create a descriptive string representation

string|null $prettyConstraint

getDescription()

getDescription() : string

Returns

string

getSource()

getSource() : string

Returns

string

getTarget()

getTarget() : string

Returns

string

getPrettyConstraint()

getPrettyConstraint() : string

Throws

\UnexpectedValueException

If no pretty constraint was provided

Returns

string

__toString()

__toString() : string

Returns

string

getPrettyString()

getPrettyString(\Composer\Package\PackageInterface  $sourcePackage) : string

Parameters

\Composer\Package\PackageInterface $sourcePackage

Returns

string