\Composer\PackageRootAliasPackage

Base class for packages providing name storage and default match implementation

Summary

Methods
Properties
Constants
__construct()
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()
setTransportOptions()
getTransportOptions()
setDistMirrors()
getDistMirrors()
getScripts()
getLicense()
getAutoload()
getDevAutoload()
getIncludePaths()
getRepositories()
getReleaseDate()
getBinaries()
getKeywords()
getDescription()
getHomepage()
getSuggests()
getAuthors()
getSupport()
getNotificationUrl()
getArchiveExcludes()
isAbandoned()
getReplacementPackage()
__toString()
getName()
getPrettyName()
getNames()
setId()
getId()
setRepository()
getRepository()
isPlatform()
getUniqueName()
equals()
getPrettyString()
getFullPrettyVersion()
getStabilityPriority()
__clone()
getAliases()
getMinimumStability()
getStabilityFlags()
getReferences()
getPreferStable()
getConfig()
setRequires()
setDevRequires()
setConflicts()
setProvides()
setReplaces()
setRepositories()
setAutoload()
setDevAutoload()
setStabilityFlags()
setSuggests()
setExtra()
$supportedLinkTypes
$stabilities
$id
STABILITY_STABLE
STABILITY_RC
STABILITY_BETA
STABILITY_ALPHA
STABILITY_DEV
replaceSelfVersionDependencies()
$version
$prettyVersion
$dev
$rootPackageAlias
$stability
$aliasOf
$requires
$devRequires
$conflicts
$provides
$replaces
$name
$prettyName
$repository
$transportOptions
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

$version

$version : 

Type

$prettyVersion

$prettyVersion : 

Type

$dev

$dev : 

Type

$rootPackageAlias

$rootPackageAlias : 

Type

$stability

$stability : 

Type

$name

$name : string

Type

string

$prettyName

$prettyName : string

Type

string

$transportOptions

$transportOptions : array

Type

array

Methods

__construct()

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

All descendants' constructors should call this parent constructor

Parameters

\Composer\Package\RootPackageInterface $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

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

setTransportOptions()

setTransportOptions(array  $options) 

Configures the list of options to download package dist files

Parameters

array $options

getTransportOptions()

getTransportOptions() : array

Returns a list of options to download package dist files

Returns

array

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

__toString()

__toString() : string

Converts the package into a readable and unique string

Returns

string

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

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

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

getAliases()

getAliases() : array

Returns a set of package names and their aliases

Returns

array

getMinimumStability()

getMinimumStability() : string

Returns the minimum stability of the package

Returns

string

getStabilityFlags()

getStabilityFlags() : array

Returns the stability flags to apply to dependencies

array('foo/bar' => 'dev')

Returns

array

getReferences()

getReferences() : array

Returns a set of package names and source references that must be enforced on them

array('foo/bar' => 'abcd1234')

Returns

array

getPreferStable()

getPreferStable() : boolean

Returns true if the root package prefers picking stable packages over unstable ones

Returns

boolean

getConfig()

getConfig() : array

Returns the root package's configuration

Returns

array

setRequires()

setRequires(array  $require) 

Set the required packages

Parameters

array $require

setDevRequires()

setDevRequires(array  $devRequire) 

Set the recommended packages

Parameters

array $devRequire

setConflicts()

setConflicts(array  $conflicts) 

Set the conflicting packages

Parameters

array $conflicts

A set of package links

setProvides()

setProvides(array  $provides) 

Set the provided virtual packages

Parameters

array $provides

A set of package links

setReplaces()

setReplaces(array  $replaces) 

Set the packages this one replaces

Parameters

array $replaces

A set of package links

setRepositories()

setRepositories(array  $repositories) 

Set the repositories

Parameters

array $repositories

setAutoload()

setAutoload(array  $autoload) 

Set the autoload mapping

Parameters

array $autoload

Mapping of autoloading rules

setDevAutoload()

setDevAutoload(array  $devAutoload) 

Set the dev autoload mapping

Parameters

array $devAutoload

Mapping of dev autoloading rules

setStabilityFlags()

setStabilityFlags(array  $stabilityFlags) 

Set the stabilityFlags

Parameters

array $stabilityFlags

setSuggests()

setSuggests(array  $suggests) 

Set the suggested packages

Parameters

array $suggests

A set of package names/comments

setExtra()

setExtra(array  $extra) 

Parameters

array $extra

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>