\Composer\PackageAliasPackage

Base class for packages providing name storage and default match implementation

Summary

Methods
Properties
Constants
__construct()
getName()
getPrettyName()
getNames()
setId()
getId()
setRepository()
getRepository()
getTransportOptions()
setTransportOptions()
isPlatform()
getUniqueName()
equals()
__toString()
getPrettyString()
getFullPrettyVersion()
getStabilityPriority()
__clone()
getAliasOf()
getVersion()
getStability()
getPrettyVersion()
isDev()
getRequires()
getConflicts()
getProvides()
getReplaces()
getDevRequires()
setRootPackageAlias()
isRootPackageAlias()
getType()
getTargetDir()
getExtra()
setInstallationSource()
getInstallationSource()
getSourceType()
getSourceUrl()
getSourceUrls()
getSourceReference()
setSourceReference()
setSourceMirrors()
getSourceMirrors()
getDistType()
getDistUrl()
getDistUrls()
getDistReference()
setDistReference()
getDistSha1Checksum()
setDistMirrors()
getDistMirrors()
getScripts()
getLicense()
getAutoload()
getDevAutoload()
getIncludePaths()
getRepositories()
getReleaseDate()
getBinaries()
getKeywords()
getDescription()
getHomepage()
getSuggests()
getAuthors()
getSupport()
getNotificationUrl()
getArchiveExcludes()
isAbandoned()
getReplacementPackage()
$supportedLinkTypes
$stabilities
$id
STABILITY_STABLE
STABILITY_RC
STABILITY_BETA
STABILITY_ALPHA
STABILITY_DEV
replaceSelfVersionDependencies()
$name
$prettyName
$repository
$transportOptions
$version
$prettyVersion
$dev
$rootPackageAlias
$stability
$aliasOf
$requires
$devRequires
$conflicts
$provides
$replaces
N/A
No private methods found
No private properties found
N/A

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

$version

$version : 

Type

$prettyVersion

$prettyVersion : 

Type

$dev

$dev : 

Type

$rootPackageAlias

$rootPackageAlias : 

Type

$stability

$stability : 

Type

Methods

__construct()

__construct(\Composer\Package\PackageInterface  $aliasOf, string  $version, string  $prettyVersion) 

All descendants' constructors should call this parent constructor

Parameters

\Composer\Package\PackageInterface $aliasOf

The package this package is an alias of

string $version

The version the alias must report

string $prettyVersion

The alias's non-normalized version

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() 

getVersion()

getVersion() 

{@inheritDoc}

getStability()

getStability() 

{@inheritDoc}

getPrettyVersion()

getPrettyVersion() 

{@inheritDoc}

isDev()

isDev() 

{@inheritDoc}

getRequires()

getRequires() 

{@inheritDoc}

getConflicts()

getConflicts() 

{@inheritDoc}

getProvides()

getProvides() 

{@inheritDoc}

getReplaces()

getReplaces() 

{@inheritDoc}

getDevRequires()

getDevRequires() 

{@inheritDoc}

setRootPackageAlias()

setRootPackageAlias(boolean  $value) : mixed

Stores whether this is an alias created by an aliasing in the requirements of the root package or not

Use by the policy for sorting manually aliased packages first, see #576

Parameters

boolean $value

Returns

mixed

isRootPackageAlias()

isRootPackageAlias() : boolean

Returns

boolean

getType()

getType() 

getTargetDir()

getTargetDir() 

getExtra()

getExtra() 

setInstallationSource()

setInstallationSource(  $type) 

Parameters

$type

getInstallationSource()

getInstallationSource() 

getSourceType()

getSourceType() 

getSourceUrl()

getSourceUrl() 

getSourceUrls()

getSourceUrls() 

getSourceReference()

getSourceReference() 

setSourceReference()

setSourceReference(  $reference) 

Parameters

$reference

setSourceMirrors()

setSourceMirrors(  $mirrors) 

Parameters

$mirrors

getSourceMirrors()

getSourceMirrors() 

getDistType()

getDistType() 

getDistUrl()

getDistUrl() 

getDistUrls()

getDistUrls() 

getDistReference()

getDistReference() 

setDistReference()

setDistReference(  $reference) 

Parameters

$reference

getDistSha1Checksum()

getDistSha1Checksum() 

setDistMirrors()

setDistMirrors(  $mirrors) 

Parameters

$mirrors

getDistMirrors()

getDistMirrors() 

getScripts()

getScripts() : array

Returns the scripts of this package

Returns

array —

array('script name' => array('listeners'))

getLicense()

getLicense() : array

Returns the package license, e.g. MIT, BSD, GPL

Returns

array —

The package licenses

getAutoload()

getAutoload() 

getDevAutoload()

getDevAutoload() 

getIncludePaths()

getIncludePaths() 

getRepositories()

getRepositories() : array

Returns an array of repositories

{"": {<config key/values>}}

Returns

array —

Repositories

getReleaseDate()

getReleaseDate() 

getBinaries()

getBinaries() 

getKeywords()

getKeywords() : array

Returns an array of keywords relating to the package

Returns

array

getDescription()

getDescription() : string

Returns the package description

Returns

string

getHomepage()

getHomepage() : string

Returns the package homepage

Returns

string

getSuggests()

getSuggests() 

getAuthors()

getAuthors() : array

Returns an array of authors of the package

Each item can contain name/homepage/email keys

Returns

array

getSupport()

getSupport() : array

Returns the support information

Returns

array

getNotificationUrl()

getNotificationUrl() 

getArchiveExcludes()

getArchiveExcludes() 

isAbandoned()

isAbandoned() : boolean

Returns if the package is abandoned or not

Returns

boolean

getReplacementPackage()

getReplacementPackage() : string

If the package is abandoned and has a suggested replacement, this method returns it

Returns

string

replaceSelfVersionDependencies()

replaceSelfVersionDependencies(array<mixed,\Composer\Package\Link>  $links, string  $linkType) : array<mixed,\Composer\Package\Link>

Parameters

array<mixed,\Composer\Package\Link> $links
string $linkType

Returns

array<mixed,\Composer\Package\Link>