class RootAliasPackage extends AliasPackage implements RootPackageInterface (View source)

Constants

STABILITY_STABLE

STABILITY_RC

STABILITY_BETA

STABILITY_ALPHA

STABILITY_DEV

Properties

static $supportedLinkTypes from BasePackage
static $stabilities from BasePackage
int $id READ-ONLY: The package id, public for fast access in dependency solver from BasePackage
protected string $name from BasePackage
protected string $prettyName from BasePackage
protected RepositoryInterface $repository from BasePackage
protected array $transportOptions from BasePackage
protected $version from AliasPackage
protected $prettyVersion from AliasPackage
protected $dev from AliasPackage
protected $rootPackageAlias from AliasPackage
protected $stability from AliasPackage
protected PackageInterface $aliasOf from AliasPackage
protected Link[] $requires from AliasPackage
protected Link[] $devRequires from AliasPackage
protected Link[] $conflicts from AliasPackage
protected Link[] $provides from AliasPackage
protected Link[] $replaces from AliasPackage

Methods

__construct(PackageInterface $aliasOf, string $version, string $prettyVersion)

All descendants' constructors should call this parent constructor

string
getName()

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

string
getPrettyName()

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

array
getNames()

Returns a set of names that could refer to this package

setId(int $id)

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

int
getId()

Retrieves the package's id set through setId

setRepository(RepositoryInterface $repository)

Stores a reference to the repository that owns the package

getRepository()

Returns a reference to the repository that owns the package

array
getTransportOptions()

Returns a list of options to download package dist files

setTransportOptions(array $options)

Configures the list of options to download package dist files

bool
isPlatform()

checks if this package is a platform package

string
getUniqueName()

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

equals(PackageInterface $package)

No description

string
__toString()

Converts the package into a readable and unique string

string
getPrettyString()

Converts the package into a pretty readable string

string
getFullPrettyVersion(bool $truncate = true)

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

getStabilityPriority()

No description

__clone()

No description

getAliasOf()

No description

string
getVersion()

Returns the version of this package

string
getStability()

Returns the stability of this package: one of (dev, alpha, beta, RC, stable)

string
getPrettyVersion()

Returns the pretty (i.e. non-normalized) version string of this package

bool
isDev()

Returns whether the package is a development virtual package or a concrete one

Link[]
getRequires()

Returns a set of links to packages which need to be installed before this package can be installed

Link[]
getConflicts()

Returns a set of links to packages which must not be installed at the same time as this package

Link[]
getProvides()

Returns a set of links to virtual packages that are provided through this package

Link[]
getReplaces()

Returns a set of links to packages which can alternatively be satisfied by installing this package

Link[]
getDevRequires()

Returns a set of links to packages which are required to develop this package. These are installed if in dev mode.

mixed
setRootPackageAlias(bool $value)

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

bool
isRootPackageAlias()

No description

Link[]
replaceSelfVersionDependencies(array $links, string $linkType)

No description

string
getType()

Returns the package type, e.g. library

string
getTargetDir()

Returns the package targetDir property

array
getExtra()

Returns the package extra data

setInstallationSource(string $type)

Sets source from which this package was installed (source/dist).

string
getInstallationSource()

Returns source from which this package was installed (source/dist).

string
getSourceType()

Returns the repository type of this package, e.g. git, svn

string
getSourceUrl()

Returns the repository url of this package, e.g. git://github.com/naderman/composer.git

array
getSourceUrls()

Returns the repository urls of this package including mirrors, e.g. git://github.com/naderman/composer.git

string
getSourceReference()

Returns the repository reference of this package, e.g. master, 1.0.0 or a commit hash for git

setSourceReference($reference)

No description

setSourceMirrors($mirrors)

No description

array|null
getSourceMirrors()

Returns the source mirrors of this package

string
getDistType()

Returns the type of the distribution archive of this version, e.g. zip, tarball

string
getDistUrl()

Returns the url of the distribution archive of this version

array
getDistUrls()

Returns the urls of the distribution archive of this version, including mirrors

string
getDistReference()

Returns the reference of the distribution archive of this version, e.g. master, 1.0.0 or a commit hash for git

setDistReference($reference)

No description

string
getDistSha1Checksum()

Returns the sha1 checksum for the distribution archive of this version

setDistMirrors($mirrors)

No description

array|null
getDistMirrors()

Returns the dist mirrors of this package

array
getScripts()

Returns the scripts of this package

array
getLicense()

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

array
getAutoload()

Returns an associative array of autoloading rules

array
getDevAutoload()

Returns an associative array of dev autoloading rules

array
getIncludePaths()

Returns a list of directories which should get added to PHP's include path.

array
getRepositories()

Returns an array of repositories

getReleaseDate()

Returns the release date of the package

array
getBinaries()

Returns the package binaries

array
getKeywords()

Returns an array of keywords relating to the package

string
getDescription()

Returns the package description

string
getHomepage()

Returns the package homepage

array
getSuggests()

Returns a set of package names and reasons why they are useful in combination with this package.

array
getAuthors()

Returns an array of authors of the package

array
getSupport()

Returns the support information

string
getNotificationUrl()

Returns the package notification url

array
getArchiveExcludes()

Returns a list of patterns to exclude from package archives

bool
isAbandoned()

Returns if the package is abandoned or not

string
getReplacementPackage()

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

array
getAliases()

Returns a set of package names and their aliases

string
getMinimumStability()

Returns the minimum stability of the package

array
getStabilityFlags()

Returns the stability flags to apply to dependencies

array
getReferences()

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

bool
getPreferStable()

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

array
getConfig()

Returns the root package's configuration

setRequires(array $require)

Set the required packages

setDevRequires(array $devRequire)

Set the recommended packages

setConflicts(array $conflicts)

Set the conflicting packages

setProvides(array $provides)

Set the provided virtual packages

setReplaces(array $replaces)

Set the packages this one replaces

setRepositories(array $repositories)

Set the repositories

setAutoload(array $autoload)

Set the autoload mapping

setDevAutoload(array $devAutoload)

Set the dev autoload mapping

setStabilityFlags(array $stabilityFlags)

Set the stabilityFlags

setSuggests(array $suggests)

Set the suggested packages

setExtra(array $extra)

No description

Details

__construct(PackageInterface $aliasOf, string $version, string $prettyVersion)

All descendants' constructors should call this parent constructor

Parameters

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

string getName()

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

Return Value

string package name

string getPrettyName()

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

Return Value

string package name

array getNames()

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.

Return Value

array An array of strings referring to this package

setId(int $id)

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

Parameters

int $id

int getId()

Retrieves the package's id set through setId

Return Value

int The previously set package id

setRepository(RepositoryInterface $repository)

Stores a reference to the repository that owns the package

Parameters

RepositoryInterface $repository

RepositoryInterface getRepository()

Returns a reference to the repository that owns the package

Return Value

RepositoryInterface

array getTransportOptions()

Returns a list of options to download package dist files

Return Value

array

setTransportOptions(array $options)

Configures the list of options to download package dist files

Parameters

array $options

bool isPlatform()

checks if this package is a platform package

Return Value

bool

string getUniqueName()

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

Return Value

string

equals(PackageInterface $package)

Parameters

PackageInterface $package

string __toString()

Converts the package into a readable and unique string

Return Value

string

string getPrettyString()

Converts the package into a pretty readable string

Return Value

string

string getFullPrettyVersion(bool $truncate = true)

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

Parameters

bool $truncate If the source reference is a sha1 hash, truncate it

Return Value

string version

getStabilityPriority()

__clone()

PackageInterface getAliasOf()

Return Value

PackageInterface

string getVersion()

Returns the version of this package

Return Value

string version

string getStability()

Returns the stability of this package: one of (dev, alpha, beta, RC, stable)

Return Value

string

string getPrettyVersion()

Returns the pretty (i.e. non-normalized) version string of this package

Return Value

string version

bool isDev()

Returns whether the package is a development virtual package or a concrete one

Return Value

bool

Link[] getRequires()

Returns a set of links to packages which need to be installed before this package can be installed

Return Value

Link[] An array of package links defining required packages

Link[] getConflicts()

Returns a set of links to packages which must not be installed at the same time as this package

Return Value

Link[] An array of package links defining conflicting packages

Link[] getProvides()

Returns a set of links to virtual packages that are provided through this package

Return Value

Link[] An array of package links defining provided packages

Link[] getReplaces()

Returns a set of links to packages which can alternatively be satisfied by installing this package

Return Value

Link[] An array of package links defining replaced packages

Link[] getDevRequires()

Returns a set of links to packages which are required to develop this package. These are installed if in dev mode.

Return Value

Link[] An array of package links defining packages required for development

mixed setRootPackageAlias(bool $value)

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

bool $value

Return Value

mixed

bool isRootPackageAlias()

Return Value

bool

See also

setRootPackageAlias

protected Link[] replaceSelfVersionDependencies(array $links, string $linkType)

Parameters

array $links
string $linkType

Return Value

Link[]

string getType()

Returns the package type, e.g. library

Return Value

string The package type

string getTargetDir()

Returns the package targetDir property

Return Value

string The package targetDir

array getExtra()

Returns the package extra data

Return Value

array The package extra data

setInstallationSource(string $type)

Sets source from which this package was installed (source/dist).

Parameters

string $type source/dist

string getInstallationSource()

Returns source from which this package was installed (source/dist).

Return Value

string source/dist

string getSourceType()

Returns the repository type of this package, e.g. git, svn

Return Value

string The repository type

string getSourceUrl()

Returns the repository url of this package, e.g. git://github.com/naderman/composer.git

Return Value

string The repository url

array getSourceUrls()

Returns the repository urls of this package including mirrors, e.g. git://github.com/naderman/composer.git

Return Value

array

string getSourceReference()

Returns the repository reference of this package, e.g. master, 1.0.0 or a commit hash for git

Return Value

string The repository reference

setSourceReference($reference)

Parameters

$reference

setSourceMirrors($mirrors)

Parameters

$mirrors

array|null getSourceMirrors()

Returns the source mirrors of this package

Return Value

array|null

string getDistType()

Returns the type of the distribution archive of this version, e.g. zip, tarball

Return Value

string The repository type

string getDistUrl()

Returns the url of the distribution archive of this version

Return Value

string

array getDistUrls()

Returns the urls of the distribution archive of this version, including mirrors

Return Value

array

string getDistReference()

Returns the reference of the distribution archive of this version, e.g. master, 1.0.0 or a commit hash for git

Return Value

string

setDistReference($reference)

Parameters

$reference

string getDistSha1Checksum()

Returns the sha1 checksum for the distribution archive of this version

Return Value

string

setDistMirrors($mirrors)

Parameters

$mirrors

array|null getDistMirrors()

Returns the dist mirrors of this package

Return Value

array|null

array getScripts()

Returns the scripts of this package

Return Value

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

array getLicense()

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

Return Value

array The package licenses

array getAutoload()

Returns an associative array of autoloading rules

{"": {"<namespace": ""}}

Type is either "psr-4", "psr-0", "classmap" or "files". Namespaces are mapped to directories for autoloading using the type specified.

Return Value

array Mapping of autoloading rules

array getDevAutoload()

Returns an associative array of dev autoloading rules

{"": {"<namespace": ""}}

Type is either "psr-4", "psr-0", "classmap" or "files". Namespaces are mapped to directories for autoloading using the type specified.

Return Value

array Mapping of dev autoloading rules

array getIncludePaths()

Returns a list of directories which should get added to PHP's include path.

Return Value

array

array getRepositories()

Returns an array of repositories

{"": {}}

Return Value

array Repositories

DateTime getReleaseDate()

Returns the release date of the package

Return Value

DateTime

array getBinaries()

Returns the package binaries

Return Value

array

array getKeywords()

Returns an array of keywords relating to the package

Return Value

array

string getDescription()

Returns the package description

Return Value

string

string getHomepage()

Returns the package homepage

Return Value

string

array getSuggests()

Returns a set of package names and reasons why they are useful in combination with this package.

Return Value

array An array of package suggestions with descriptions

array getAuthors()

Returns an array of authors of the package

Each item can contain name/homepage/email keys

Return Value

array

array getSupport()

Returns the support information

Return Value

array

string getNotificationUrl()

Returns the package notification url

Return Value

string

array getArchiveExcludes()

Returns a list of patterns to exclude from package archives

Return Value

array

bool isAbandoned()

Returns if the package is abandoned or not

Return Value

bool

string getReplacementPackage()

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

Return Value

string

array getAliases()

Returns a set of package names and their aliases

Return Value

array

string getMinimumStability()

Returns the minimum stability of the package

Return Value

string

array getStabilityFlags()

Returns the stability flags to apply to dependencies

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

Return Value

array

array getReferences()

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

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

Return Value

array

bool getPreferStable()

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

Return Value

bool

array getConfig()

Returns the root package's configuration

Return Value

array

setRequires(array $require)

Set the required packages

Parameters

array $require

setDevRequires(array $devRequire)

Set the recommended packages

Parameters

array $devRequire

setConflicts(array $conflicts)

Set the conflicting packages

Parameters

array $conflicts A set of package links

setProvides(array $provides)

Set the provided virtual packages

Parameters

array $provides A set of package links

setReplaces(array $replaces)

Set the packages this one replaces

Parameters

array $replaces A set of package links

setRepositories(array $repositories)

Set the repositories

Parameters

array $repositories

setAutoload(array $autoload)

Set the autoload mapping

Parameters

array $autoload Mapping of autoloading rules

setDevAutoload(array $devAutoload)

Set the dev autoload mapping

Parameters

array $devAutoload Mapping of dev autoloading rules

setStabilityFlags(array $stabilityFlags)

Set the stabilityFlags

Parameters

array $stabilityFlags

setSuggests(array $suggests)

Set the suggested packages

Parameters

array $suggests A set of package names/comments

setExtra(array $extra)

Parameters

array $extra