Documentation

RootPackageInterface extends CompletePackageInterface

Defines additional fields that are only needed for the root package

Tags
author

Jordi Boggiano j.boggiano@seld.be

Table of Contents

__toString()  : string
Converts the package into a readable and unique string
getAliases()  : array<string|int, mixed>
Returns a set of package names and their aliases
getArchiveExcludes()  : array<string|int, mixed>
Returns a list of patterns to exclude from package archives
getAuthors()  : array<string|int, mixed>
Returns an array of authors of the package
getAutoload()  : array<string|int, mixed>
Returns an associative array of autoloading rules
getBinaries()  : array<string|int, mixed>
Returns the package binaries
getConfig()  : array<string|int, mixed>
Returns the root package's configuration
getConflicts()  : array<string|int, Link>
Returns a set of links to packages which must not be installed at the same time as this package
getDescription()  : string
Returns the package description
getDevAutoload()  : array<string|int, mixed>
Returns an associative array of dev autoloading rules
getDevRequires()  : array<string|int, Link>
Returns a set of links to packages which are required to develop this package. These are installed if in dev mode.
getDistMirrors()  : array<string|int, mixed>|null
Returns the dist mirrors of this package
getDistReference()  : string
Returns the reference of the distribution archive of this version, e.g. master, 1.0.0 or a commit hash for git
getDistSha1Checksum()  : string
Returns the sha1 checksum for the distribution archive of this version
getDistType()  : string
Returns the type of the distribution archive of this version, e.g. zip, tarball
getDistUrl()  : string
Returns the url of the distribution archive of this version
getDistUrls()  : array<string|int, mixed>
Returns the urls of the distribution archive of this version, including mirrors
getExtra()  : array<string|int, mixed>
Returns the package extra data
getFullPrettyVersion()  : string
Returns the pretty version string plus a git or hg commit hash of this package
getFunding()  : array<string|int, mixed>
Returns an array of funding options for the package
getHomepage()  : string
Returns the package homepage
getId()  : int
Retrieves the package's id set through setId
getIncludePaths()  : array<string|int, mixed>
Returns a list of directories which should get added to PHP's include path.
getInstallationSource()  : string
Returns source from which this package was installed (source/dist).
getKeywords()  : array<string|int, mixed>
Returns an array of keywords relating to the package
getLicense()  : array<string|int, mixed>
Returns the package license, e.g. MIT, BSD, GPL
getMinimumStability()  : string
Returns the minimum stability of the package
getName()  : string
Returns the package's name without version info, thus not a unique identifier
getNames()  : array<string|int, mixed>
Returns a set of names that could refer to this package
getNotificationUrl()  : string
Returns the package notification url
getPreferStable()  : bool
Returns true if the root package prefers picking stable packages over unstable ones
getPrettyName()  : string
Returns the package's pretty (i.e. with proper case) name
getPrettyString()  : string
Converts the package into a pretty readable string
getPrettyVersion()  : string
Returns the pretty (i.e. non-normalized) version string of this package
getProvides()  : array<string|int, Link>
Returns a set of links to virtual packages that are provided through this package
getReferences()  : array<string|int, mixed>
Returns a set of package names and source references that must be enforced on them
getReleaseDate()  : DateTime
Returns the release date of the package
getReplacementPackage()  : string
If the package is abandoned and has a suggested replacement, this method returns it
getReplaces()  : array<string|int, Link>
Returns a set of links to packages which can alternatively be satisfied by installing this package
getRepositories()  : array<string|int, mixed>
Returns an array of repositories
getRepository()  : RepositoryInterface
Returns a reference to the repository that owns the package
getRequires()  : array<string|int, Link>
Returns a set of links to packages which need to be installed before this package can be installed
getScripts()  : array<string|int, mixed>
Returns the scripts of this package
getSourceMirrors()  : array<string|int, mixed>|null
Returns the source mirrors of this package
getSourceReference()  : string
Returns the repository reference of this package, e.g. master, 1.0.0 or a commit hash for git
getSourceType()  : string
Returns the repository type of this package, e.g. git, svn
getSourceUrl()  : string
Returns the repository url of this package, e.g. git://github.com/naderman/composer.git
getSourceUrls()  : array<string|int, mixed>
Returns the repository urls of this package including mirrors, e.g. git://github.com/naderman/composer.git
getStability()  : string
Returns the stability of this package: one of (dev, alpha, beta, RC, stable)
getStabilityFlags()  : array<string|int, mixed>
Returns the stability flags to apply to dependencies
getSuggests()  : array<string|int, mixed>
Returns a set of package names and reasons why they are useful in combination with this package.
getSupport()  : array<string|int, mixed>
Returns the support information
getTargetDir()  : string
Returns the package targetDir property
getTransportOptions()  : array<string|int, mixed>
Returns a list of options to download package dist files
getType()  : string
Returns the package type, e.g. library
getUniqueName()  : string
Returns package unique name, constructed from name and version.
getVersion()  : string
Returns the version of this package
isAbandoned()  : bool
Returns if the package is abandoned or not
isDev()  : bool
Returns whether the package is a development virtual package or a concrete one
setAutoload()  : mixed
Set the autoload mapping
setConflicts()  : mixed
Set the conflicting packages
setDevAutoload()  : mixed
Set the dev autoload mapping
setDevRequires()  : mixed
Set the recommended packages
setDistReference()  : void
setDistType()  : void
setDistUrl()  : void
setExtra()  : mixed
setId()  : mixed
Allows the solver to set an id for this package to refer to it.
setInstallationSource()  : mixed
Sets source from which this package was installed (source/dist).
setProvides()  : mixed
Set the provided virtual packages
setReplaces()  : mixed
Set the packages this one replaces
setRepositories()  : mixed
Set the repositories
setRepository()  : mixed
Stores a reference to the repository that owns the package
setRequires()  : mixed
Set the required packages
setSourceReference()  : void
setStabilityFlags()  : mixed
Set the stabilityFlags
setSuggests()  : mixed
Set the suggested packages

Methods

__toString()

Converts the package into a readable and unique string

public __toString() : string
Return values
string

getAliases()

Returns a set of package names and their aliases

public getAliases() : array<string|int, mixed>
Return values
array<string|int, mixed>

getArchiveExcludes()

Returns a list of patterns to exclude from package archives

public getArchiveExcludes() : array<string|int, mixed>
Return values
array<string|int, mixed>

getAuthors()

Returns an array of authors of the package

public getAuthors() : array<string|int, mixed>

Each item can contain name/homepage/email keys

Return values
array<string|int, mixed>

getAutoload()

Returns an associative array of autoloading rules

public getAutoload() : array<string|int, mixed>

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

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

Return values
array<string|int, mixed>

Mapping of autoloading rules

getBinaries()

Returns the package binaries

public getBinaries() : array<string|int, mixed>
Return values
array<string|int, mixed>

getConfig()

Returns the root package's configuration

public getConfig() : array<string|int, mixed>
Return values
array<string|int, mixed>

getConflicts()

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

public getConflicts() : array<string|int, Link>
Return values
array<string|int, Link>

An array of package links defining conflicting packages

getDescription()

Returns the package description

public getDescription() : string
Return values
string

getDevAutoload()

Returns an associative array of dev autoloading rules

public getDevAutoload() : array<string|int, mixed>

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

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

Return values
array<string|int, mixed>

Mapping of dev autoloading rules

getDevRequires()

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

public getDevRequires() : array<string|int, Link>
Return values
array<string|int, Link>

An array of package links defining packages required for development

getDistMirrors()

Returns the dist mirrors of this package

public getDistMirrors() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getDistReference()

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

public getDistReference() : string
Return values
string

getDistSha1Checksum()

Returns the sha1 checksum for the distribution archive of this version

public getDistSha1Checksum() : string
Return values
string

getDistType()

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

public getDistType() : string
Return values
string

The repository type

getDistUrl()

Returns the url of the distribution archive of this version

public getDistUrl() : string
Return values
string

getDistUrls()

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

public getDistUrls() : array<string|int, mixed>
Return values
array<string|int, mixed>

getExtra()

Returns the package extra data

public getExtra() : array<string|int, mixed>
Return values
array<string|int, mixed>

The package extra data

getFullPrettyVersion()

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

public getFullPrettyVersion([bool $truncate = true ]) : string
Parameters
$truncate : bool = true

If the source reference is a sha1 hash, truncate it

Tags
see
getPrettyVersion
Return values
string

version

getFunding()

Returns an array of funding options for the package

public getFunding() : array<string|int, mixed>

Each item will contain type and url keys

Return values
array<string|int, mixed>

getId()

Retrieves the package's id set through setId

public getId() : int
Return values
int

The previously set package id

getIncludePaths()

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

public getIncludePaths() : array<string|int, mixed>
Return values
array<string|int, mixed>

getInstallationSource()

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

public getInstallationSource() : string
Return values
string

source/dist

getKeywords()

Returns an array of keywords relating to the package

public getKeywords() : array<string|int, mixed>
Return values
array<string|int, mixed>

getLicense()

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

public getLicense() : array<string|int, mixed>
Return values
array<string|int, mixed>

The package licenses

getMinimumStability()

Returns the minimum stability of the package

public getMinimumStability() : string
Return values
string

getName()

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

public getName() : string
Return values
string

package name

getNames()

Returns a set of names that could refer to this package

public getNames() : array<string|int, mixed>

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 values
array<string|int, mixed>

An array of strings referring to this package

getNotificationUrl()

Returns the package notification url

public getNotificationUrl() : string
Return values
string

getPreferStable()

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

public getPreferStable() : bool
Return values
bool

getPrettyName()

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

public getPrettyName() : string
Return values
string

package name

getPrettyString()

Converts the package into a pretty readable string

public getPrettyString() : string
Return values
string

getPrettyVersion()

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

public getPrettyVersion() : string
Return values
string

version

getProvides()

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

public getProvides() : array<string|int, Link>
Return values
array<string|int, Link>

An array of package links defining provided packages

getReferences()

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

public getReferences() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

getReleaseDate()

Returns the release date of the package

public getReleaseDate() : DateTime
Return values
DateTime

getReplacementPackage()

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

public getReplacementPackage() : string
Return values
string

getReplaces()

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

public getReplaces() : array<string|int, Link>
Return values
array<string|int, Link>

An array of package links defining replaced packages

getRepositories()

Returns an array of repositories

public getRepositories() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

Repositories

getRequires()

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

public getRequires() : array<string|int, Link>
Return values
array<string|int, Link>

An array of package links defining required packages

getScripts()

Returns the scripts of this package

public getScripts() : array<string|int, mixed>
Return values
array<string|int, mixed>

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

getSourceMirrors()

Returns the source mirrors of this package

public getSourceMirrors() : array<string|int, mixed>|null
Return values
array<string|int, mixed>|null

getSourceReference()

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

public getSourceReference() : string
Return values
string

The repository reference

getSourceType()

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

public getSourceType() : string
Return values
string

The repository type

getSourceUrl()

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

public getSourceUrl() : string
Return values
string

The repository url

getSourceUrls()

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

public getSourceUrls() : array<string|int, mixed>
Return values
array<string|int, mixed>

getStability()

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

public getStability() : string
Return values
string

getStabilityFlags()

Returns the stability flags to apply to dependencies

public getStabilityFlags() : array<string|int, mixed>

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

Return values
array<string|int, mixed>

getSuggests()

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

public getSuggests() : array<string|int, mixed>
Return values
array<string|int, mixed>

An array of package suggestions with descriptions

getSupport()

Returns the support information

public getSupport() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTargetDir()

Returns the package targetDir property

public getTargetDir() : string
Return values
string

The package targetDir

getTransportOptions()

Returns a list of options to download package dist files

public getTransportOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getType()

Returns the package type, e.g. library

public getType() : string
Return values
string

The package type

getUniqueName()

Returns package unique name, constructed from name and version.

public getUniqueName() : string
Return values
string

getVersion()

Returns the version of this package

public getVersion() : string
Return values
string

version

isAbandoned()

Returns if the package is abandoned or not

public isAbandoned() : bool
Return values
bool

isDev()

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

public isDev() : bool
Return values
bool

setAutoload()

Set the autoload mapping

public setAutoload(array<string|int, mixed> $autoload) : mixed
Parameters
$autoload : array<string|int, mixed>

Mapping of autoloading rules

Return values
mixed

setConflicts()

Set the conflicting packages

public setConflicts(array<string|int, Link$conflicts) : mixed
Parameters
$conflicts : array<string|int, Link>

A set of package links

Return values
mixed

setDevAutoload()

Set the dev autoload mapping

public setDevAutoload(array<string|int, mixed> $devAutoload) : mixed
Parameters
$devAutoload : array<string|int, mixed>

Mapping of dev autoloading rules

Return values
mixed

setDevRequires()

Set the recommended packages

public setDevRequires(array<string|int, Link$devRequires) : mixed
Parameters
$devRequires : array<string|int, Link>

A set of package links

Return values
mixed

setDistReference()

public setDistReference(string $reference) : void
Parameters
$reference : string
Return values
void

setDistType()

public setDistType(string $type) : void
Parameters
$type : string
Return values
void

setDistUrl()

public setDistUrl(string $url) : void
Parameters
$url : string
Return values
void

setExtra()

public setExtra(array<string|int, mixed> $extra) : mixed
Parameters
$extra : array<string|int, mixed>
Return values
mixed

setId()

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

public setId(int $id) : mixed
Parameters
$id : int
Return values
mixed

setInstallationSource()

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

public setInstallationSource(string $type) : mixed
Parameters
$type : string

source/dist

Return values
mixed

setProvides()

Set the provided virtual packages

public setProvides(array<string|int, Link$provides) : mixed
Parameters
$provides : array<string|int, Link>

A set of package links

Return values
mixed

setReplaces()

Set the packages this one replaces

public setReplaces(array<string|int, Link$replaces) : mixed
Parameters
$replaces : array<string|int, Link>

A set of package links

Return values
mixed

setRepositories()

Set the repositories

public setRepositories(array<string|int, mixed> $repositories) : mixed
Parameters
$repositories : array<string|int, mixed>
Return values
mixed

setRequires()

Set the required packages

public setRequires(array<string|int, Link$requires) : mixed
Parameters
$requires : array<string|int, Link>

A set of package links

Return values
mixed

setSourceReference()

public setSourceReference(string $reference) : void
Parameters
$reference : string
Return values
void

setStabilityFlags()

Set the stabilityFlags

public setStabilityFlags(array<string|int, mixed> $stabilityFlags) : mixed
Parameters
$stabilityFlags : array<string|int, mixed>
Return values
mixed

setSuggests()

Set the suggested packages

public setSuggests(array<string|int, mixed> $suggests) : mixed
Parameters
$suggests : array<string|int, mixed>

A set of package names/comments

Return values
mixed

Search results