Constants

STABILITY_STABLE

STABILITY_STABLE = 0

STABILITY_RC

STABILITY_RC = 5

STABILITY_BETA

STABILITY_BETA = 10

STABILITY_ALPHA

STABILITY_ALPHA = 15

STABILITY_DEV

STABILITY_DEV = 20

Properties

$supportedLinkTypes

$supportedLinkTypes : 

Type

$stabilities

$stabilities : 

Type

$id

$id : integer

READ-ONLY: The package id, public for fast access in dependency solver

Type

integer

$name

$name : string

Type

string

$prettyName

$prettyName : string

Type

string

$transportOptions

$transportOptions : array

Type

array

Methods

__construct()

__construct(string  $name) 

All descendants' constructors should call this parent constructor

Parameters

string $name

The package's name

getName()

getName() : string

Returns the package's name without version info, thus not a unique identifier

Returns

string —

package name

getPrettyName()

getPrettyName() : string

Returns the package's pretty (i.e. with proper case) name

Returns

string —

package name

getNames()

getNames() : array

Returns a set of names that could refer to this package

No version or release type information should be included in any of the names. Provided or replaced package names need to be returned as well.

Returns

array —

An array of strings referring to this package

setId()

setId(integer  $id) 

Allows the solver to set an id for this package to refer to it.

Parameters

integer $id

getId()

getId() : integer

Retrieves the package's id set through setId

Returns

integer —

The previously set package id

setRepository()

setRepository(\Composer\Repository\RepositoryInterface  $repository) 

Stores a reference to the repository that owns the package

Parameters

\Composer\Repository\RepositoryInterface $repository

getTransportOptions()

getTransportOptions() : array

Returns a list of options to download package dist files

Returns

array

setTransportOptions()

setTransportOptions(array  $options) 

Configures the list of options to download package dist files

Parameters

array $options

isPlatform()

isPlatform() : boolean

checks if this package is a platform package

Returns

boolean

getUniqueName()

getUniqueName() : string

Returns package unique name, constructed from name, version and release type.

Returns

string

__toString()

__toString() : string

Converts the package into a readable and unique string

Returns

string

getPrettyString()

getPrettyString() : string

Converts the package into a pretty readable string

Returns

string

getFullPrettyVersion()

getFullPrettyVersion(boolean  $truncate = true) : string

Returns the pretty version string plus a git or hg commit hash of this package

Parameters

boolean $truncate

If the source reference is a sha1 hash, truncate it

Returns

string —

version

getStabilityPriority()

getStabilityPriority() 

__clone()

__clone()