interface RootPackageInterface implements CompletePackageInterface (View source)

Defines additional fields that are only needed for the root package

Methods

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

bool
isDev()

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

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

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

string
getDistSha1Checksum()

Returns the sha1 checksum for the distribution archive of this version

array|null
getDistMirrors()

Returns the dist mirrors of this package

string
getVersion()

Returns the version of this package

string
getPrettyVersion()

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

string
getFullPrettyVersion(bool $truncate = true)

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

getReleaseDate()

Returns the release date of the package

string
getStability()

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

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.

array
getSuggests()

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

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.

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

Returns the package binaries

string
getUniqueName()

Returns package unique name, constructed from name and version.

string
getNotificationUrl()

Returns the package notification url

string
__toString()

Converts the package into a readable and unique string

string
getPrettyString()

Converts the package into a pretty readable string

array
getArchiveExcludes()

Returns a list of patterns to exclude from package archives

array
getTransportOptions()

Returns a list of options to download package dist files

array
getScripts()

Returns the scripts of this package

array
getRepositories()

Returns an array of repositories

array
getLicense()

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

array
getKeywords()

Returns an array of keywords relating to the package

string
getDescription()

Returns the package description

string
getHomepage()

Returns the package homepage

array
getAuthors()

Returns an array of authors of the package

array
getSupport()

Returns the support information

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 $requires)

Set the required packages

setDevRequires(array $devRequires)

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

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

bool isDev()

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

Return Value

bool

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

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

string getDistSha1Checksum()

Returns the sha1 checksum for the distribution archive of this version

Return Value

string

array|null getDistMirrors()

Returns the dist mirrors of this package

Return Value

array|null

string getVersion()

Returns the version of this package

Return Value

string version

string getPrettyVersion()

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

Return Value

string version

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

See also

getPrettyVersion

DateTime getReleaseDate()

Returns the release date of the package

Return Value

DateTime

string getStability()

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

Return Value

string

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

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

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

Returns the package binaries

Return Value

array

string getUniqueName()

Returns package unique name, constructed from name and version.

Return Value

string

string getNotificationUrl()

Returns the package notification url

Return Value

string

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

array getArchiveExcludes()

Returns a list of patterns to exclude from package archives

Return Value

array

array getTransportOptions()

Returns a list of options to download package dist files

Return Value

array

array getScripts()

Returns the scripts of this package

Return Value

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

array getRepositories()

Returns an array of repositories

{"": {}}

Return Value

array Repositories

array getLicense()

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

Return Value

array The package licenses

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

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 $requires)

Set the required packages

Parameters

array $requires A set of package links

setDevRequires(array $devRequires)

Set the recommended packages

Parameters

array $devRequires A set of package links

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