Documentation

CompletePackageInterface extends PackageInterface

Defines package metadata that is not necessarily needed for solving and installing packages

Tags
author

Nils Adermann naderman@naderman.de

Table of Contents

__toString()  : string
Converts the package into a readable and unique string
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
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
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
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
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)
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
setDistReference()  : void
setDistType()  : void
setDistUrl()  : void
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).
setRepository()  : mixed
Stores a reference to the repository that owns the package
setSourceReference()  : void

Methods

__toString()

Converts the package into a readable and unique string

public __toString() : string
Return values
string

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>

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

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

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

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

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

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

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

setSourceReference()

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

Search results