Documentation

CompletePackage extends Package
in package
implements CompletePackageInterface

Package containing additional metadata that is not used by the solver

Tags
author

Nils Adermann naderman@naderman.de

Interfaces, Classes and Traits

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

Table of Contents

STABILITY_ALPHA  = 15
STABILITY_BETA  = 10
STABILITY_DEV  = 20
STABILITY_RC  = 5
STABILITY_STABLE  = 0
$id  : int
READ-ONLY: The package id, public for fast access in dependency solver
$stabilities  : mixed
$supportedLinkTypes  : mixed
$abandoned  : mixed
$archiveExcludes  : mixed
$authors  : mixed
$autoload  : mixed
$binaries  : mixed
$conflicts  : array<string|int, Link>
$description  : mixed
$dev  : mixed
$devAutoload  : mixed
$devRequires  : array<string|int, Link>
$distMirrors  : mixed
$distReference  : mixed
$distSha1Checksum  : mixed
$distType  : mixed
$distUrl  : mixed
$extra  : mixed
$funding  : mixed
$homepage  : mixed
$includePaths  : mixed
$installationSource  : mixed
$keywords  : mixed
$license  : mixed
$name  : string
$notificationUrl  : mixed
$prettyName  : string
$prettyVersion  : mixed
$provides  : array<string|int, Link>
$releaseDate  : mixed
$replaces  : array<string|int, Link>
$repositories  : mixed
$repository  : RepositoryInterface
$requires  : array<string|int, Link>
$scripts  : mixed
$sourceMirrors  : mixed
$sourceReference  : mixed
$sourceType  : mixed
$sourceUrl  : mixed
$stability  : mixed
$suggests  : mixed
$support  : mixed
$targetDir  : mixed
$transportOptions  : array<string|int, mixed>
$type  : mixed
$version  : mixed
__clone()  : mixed
__construct()  : mixed
All descendants' constructors should call this parent constructor
__toString()  : string
Converts the package into a readable and unique string
equals()  : mixed
getArchiveExcludes()  : mixed
{@inheritDoc}
getAuthors()  : array<string|int, mixed>
Returns an array of authors of the package
getAutoload()  : mixed
{@inheritDoc}
getBinaries()  : mixed
{@inheritDoc}
getConflicts()  : mixed
{@inheritDoc}
getDescription()  : string
Returns the package description
getDevAutoload()  : mixed
{@inheritDoc}
getDevRequires()  : mixed
{@inheritDoc}
getDistMirrors()  : mixed
{@inheritDoc}
getDistReference()  : mixed
{@inheritDoc}
getDistSha1Checksum()  : mixed
{@inheritDoc}
getDistType()  : mixed
{@inheritDoc}
getDistUrl()  : mixed
{@inheritDoc}
getDistUrls()  : mixed
{@inheritDoc}
getExtra()  : mixed
{@inheritDoc}
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()  : mixed
{@inheritDoc}
getInstallationSource()  : mixed
{@inheritDoc}
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()  : mixed
{@inheritDoc}
getPrettyName()  : string
Returns the package's pretty (i.e. with proper case) name
getPrettyString()  : string
Converts the package into a pretty readable string
getPrettyVersion()  : mixed
{@inheritDoc}
getProvides()  : mixed
{@inheritDoc}
getReleaseDate()  : mixed
{@inheritDoc}
getReplacementPackage()  : string|null
If the package is abandoned and has a suggested replacement, this method returns it
getReplaces()  : mixed
{@inheritDoc}
getRepositories()  : array<string|int, mixed>
Returns an array of repositories
getRepository()  : RepositoryInterface
Returns a reference to the repository that owns the package
getRequires()  : mixed
{@inheritDoc}
getScripts()  : array<string|int, mixed>
Returns the scripts of this package
getSourceMirrors()  : mixed
{@inheritDoc}
getSourceReference()  : mixed
{@inheritDoc}
getSourceType()  : mixed
{@inheritDoc}
getSourceUrl()  : mixed
{@inheritDoc}
getSourceUrls()  : mixed
{@inheritDoc}
getStability()  : mixed
{@inheritDoc}
getStabilityPriority()  : mixed
getSuggests()  : mixed
{@inheritDoc}
getSupport()  : array<string|int, mixed>
Returns the support information
getTargetDir()  : mixed
{@inheritDoc}
getTransportOptions()  : array<string|int, mixed>
Returns a list of options to download package dist files
getType()  : mixed
{@inheritDoc}
getUniqueName()  : string
Returns package unique name, constructed from name, version and release type.
getVersion()  : mixed
{@inheritDoc}
isAbandoned()  : bool
Returns if the package is abandoned or not
isDev()  : mixed
{@inheritDoc}
isPlatform()  : bool
checks if this package is a platform package
packageNameToRegexp()  : string
Build a regexp from a package name, expanding * globs as required
replaceVersion()  : mixed
Replaces current version and pretty version with passed values.
setAbandoned()  : mixed
setArchiveExcludes()  : mixed
Sets a list of patterns to be excluded from archives
setAuthors()  : mixed
Set the authors
setAutoload()  : mixed
Set the autoload mapping
setBinaries()  : mixed
setConflicts()  : mixed
Set the conflicting packages
setDescription()  : mixed
Set the description
setDevAutoload()  : mixed
Set the dev autoload mapping
setDevRequires()  : mixed
Set the recommended packages
setDistMirrors()  : mixed
setDistReference()  : mixed
setDistSha1Checksum()  : mixed
setDistType()  : mixed
setDistUrl()  : mixed
setExtra()  : mixed
setFunding()  : mixed
Set the funding
setHomepage()  : mixed
Set the homepage
setId()  : mixed
Allows the solver to set an id for this package to refer to it.
setIncludePaths()  : mixed
Sets the list of paths added to PHP's include path.
setInstallationSource()  : mixed
{@inheritDoc}
setKeywords()  : mixed
Set the keywords
setLicense()  : mixed
Set the license
setNotificationUrl()  : mixed
Sets the notification URL
setProvides()  : mixed
Set the provided virtual packages
setReleaseDate()  : mixed
Set the releaseDate
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
setScripts()  : mixed
setSourceMirrors()  : mixed
setSourceReference()  : mixed
setSourceType()  : mixed
setSourceUrl()  : mixed
setSuggests()  : mixed
Set the suggested packages
setSupport()  : mixed
Set the support information
setTargetDir()  : mixed
setTransportOptions()  : mixed
Configures the list of options to download package dist files
setType()  : mixed
getUrls()  : mixed

Constants

Properties

$id

READ-ONLY: The package id, public for fast access in dependency solver

public int $id

$stabilities

public static mixed $stabilities = array('stable' => self::STABILITY_STABLE, 'RC' => self::STABILITY_RC, 'beta' => self::STABILITY_BETA, 'alpha' => self::STABILITY_ALPHA, 'dev' => self::STABILITY_DEV)

$supportedLinkTypes

public static mixed $supportedLinkTypes = array('require' => array('description' => 'requires', 'method' => 'requires'), 'conflict' => array('description' => 'conflicts', 'method' => 'conflicts'), 'provide' => array('description' => 'provides', 'method' => 'provides'), 'replace' => array('description' => 'replaces', 'method' => 'replaces'), 'require-dev' => array('description' => 'requires (for development)', 'method' => 'devRequires'))

$archiveExcludes

protected mixed $archiveExcludes = array()

$autoload

protected mixed $autoload = array()

$binaries

protected mixed $binaries = array()

$conflicts

protected array<string|int, Link> $conflicts = array()

$devAutoload

protected mixed $devAutoload = array()

$devRequires

protected array<string|int, Link> $devRequires = array()

$distMirrors

protected mixed $distMirrors

$distReference

protected mixed $distReference

$distSha1Checksum

protected mixed $distSha1Checksum

$extra

protected mixed $extra = array()

$includePaths

protected mixed $includePaths = array()

$installationSource

protected mixed $installationSource

$notificationUrl

protected mixed $notificationUrl

$prettyVersion

protected mixed $prettyVersion

$provides

protected array<string|int, Link> $provides = array()

$releaseDate

protected mixed $releaseDate

$replaces

protected array<string|int, Link> $replaces = array()

$requires

protected array<string|int, Link> $requires = array()

$sourceMirrors

protected mixed $sourceMirrors

$sourceReference

protected mixed $sourceReference

$sourceType

protected mixed $sourceType

$sourceUrl

protected mixed $sourceUrl

$stability

protected mixed $stability

$suggests

protected mixed $suggests = array()

$targetDir

protected mixed $targetDir

$transportOptions

protected array<string|int, mixed> $transportOptions = array()

Methods

__clone()

public __clone() : mixed
Return values
mixed

__construct()

All descendants' constructors should call this parent constructor

public __construct(string $name) : mixed
Parameters
$name : string

The package's name

Return values
mixed

__toString()

Converts the package into a readable and unique string

public __toString() : string
Return values
string

getArchiveExcludes()

{@inheritDoc}

public getArchiveExcludes() : mixed
Return values
mixed

getAuthors()

Returns an array of authors of the package

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

getAutoload()

{@inheritDoc}

public getAutoload() : mixed
Return values
mixed

getBinaries()

{@inheritDoc}

public getBinaries() : mixed
Return values
mixed

getConflicts()

{@inheritDoc}

public getConflicts() : mixed
Return values
mixed

getDescription()

Returns the package description

public getDescription() : string
Return values
string

getDevAutoload()

{@inheritDoc}

public getDevAutoload() : mixed
Return values
mixed

getDevRequires()

{@inheritDoc}

public getDevRequires() : mixed
Return values
mixed

getDistMirrors()

{@inheritDoc}

public getDistMirrors() : mixed
Return values
mixed

getDistReference()

{@inheritDoc}

public getDistReference() : mixed
Return values
mixed

getDistSha1Checksum()

{@inheritDoc}

public getDistSha1Checksum() : mixed
Return values
mixed

getDistType()

{@inheritDoc}

public getDistType() : mixed
Return values
mixed

getDistUrl()

{@inheritDoc}

public getDistUrl() : mixed
Return values
mixed

getDistUrls()

{@inheritDoc}

public getDistUrls() : mixed
Return values
mixed

getExtra()

{@inheritDoc}

public getExtra() : mixed
Return values
mixed

getFullPrettyVersion()

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

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

If the source reference is a sha1 hash, truncate it

Return values
string

version

getFunding()

Returns an array of funding options for the package

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

getHomepage()

Returns the package homepage

public getHomepage() : string
Return values
string

getId()

Retrieves the package's id set through setId

public getId() : int
Return values
int

The previously set package id

getIncludePaths()

{@inheritDoc}

public getIncludePaths() : mixed
Return values
mixed

getInstallationSource()

{@inheritDoc}

public getInstallationSource() : mixed
Return values
mixed

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

An array of strings referring to this package

getNotificationUrl()

{@inheritDoc}

public getNotificationUrl() : mixed
Return values
mixed

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

{@inheritDoc}

public getPrettyVersion() : mixed
Return values
mixed

getProvides()

{@inheritDoc}

public getProvides() : mixed
Return values
mixed

getReleaseDate()

{@inheritDoc}

public getReleaseDate() : mixed
Return values
mixed

getReplacementPackage()

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

public getReplacementPackage() : string|null
Return values
string|null

getReplaces()

{@inheritDoc}

public getReplaces() : mixed
Return values
mixed

getRepositories()

Returns an array of repositories

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

Repositories

getRequires()

{@inheritDoc}

public getRequires() : mixed
Return values
mixed

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

{@inheritDoc}

public getSourceMirrors() : mixed
Return values
mixed

getSourceReference()

{@inheritDoc}

public getSourceReference() : mixed
Return values
mixed

getSourceType()

{@inheritDoc}

public getSourceType() : mixed
Return values
mixed

getSourceUrl()

{@inheritDoc}

public getSourceUrl() : mixed
Return values
mixed

getSourceUrls()

{@inheritDoc}

public getSourceUrls() : mixed
Return values
mixed

getStability()

{@inheritDoc}

public getStability() : mixed
Return values
mixed

getStabilityPriority()

public getStabilityPriority() : mixed
Return values
mixed

getSuggests()

{@inheritDoc}

public getSuggests() : mixed
Return values
mixed

getSupport()

Returns the support information

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

getTargetDir()

{@inheritDoc}

public getTargetDir() : mixed
Return values
mixed

getTransportOptions()

Returns a list of options to download package dist files

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

getType()

{@inheritDoc}

public getType() : mixed
Return values
mixed

getUniqueName()

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

public getUniqueName() : string
Return values
string

getVersion()

{@inheritDoc}

public getVersion() : mixed
Return values
mixed

isAbandoned()

Returns if the package is abandoned or not

public isAbandoned() : bool
Return values
bool

isDev()

{@inheritDoc}

public isDev() : mixed
Return values
mixed

isPlatform()

checks if this package is a platform package

public isPlatform() : bool
Return values
bool

packageNameToRegexp()

Build a regexp from a package name, expanding * globs as required

public static packageNameToRegexp(string $allowListPattern[, string $wrap = '{^%s$}i' ]) : string
Parameters
$allowListPattern : string
$wrap : string = '{^%s$}i'

Wrap the cleaned string by the given string

Return values
string

replaceVersion()

Replaces current version and pretty version with passed values.

public replaceVersion(string $version, string $prettyVersion) : mixed

It also sets stability.

Parameters
$version : string

The package's normalized version

$prettyVersion : string

The package's non-normalized version

Return values
mixed

setAbandoned()

public setAbandoned(bool|string $abandoned) : mixed
Parameters
$abandoned : bool|string
Return values
mixed

setArchiveExcludes()

Sets a list of patterns to be excluded from archives

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

setAuthors()

Set the authors

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

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

setBinaries()

public setBinaries(array<string|int, mixed> $binaries) : mixed
Parameters
$binaries : array<string|int, mixed>
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

setDescription()

Set the description

public setDescription(string $description) : mixed
Parameters
$description : string
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

setDistMirrors()

public setDistMirrors(array<string|int, mixed>|null $mirrors) : mixed
Parameters
$mirrors : array<string|int, mixed>|null
Return values
mixed

setDistReference()

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

setDistSha1Checksum()

public setDistSha1Checksum(string $sha1checksum) : mixed
Parameters
$sha1checksum : string
Return values
mixed

setDistType()

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

setDistUrl()

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

setExtra()

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

setFunding()

Set the funding

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

setHomepage()

Set the homepage

public setHomepage(string $homepage) : mixed
Parameters
$homepage : string
Return values
mixed

setId()

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

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

setIncludePaths()

Sets the list of paths added to PHP's include path.

public setIncludePaths(array<string|int, mixed> $includePaths) : mixed
Parameters
$includePaths : array<string|int, mixed>

List of directories.

Return values
mixed

setInstallationSource()

{@inheritDoc}

public setInstallationSource(mixed $type) : mixed
Parameters
$type : mixed
Return values
mixed

setKeywords()

Set the keywords

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

setLicense()

Set the license

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

setNotificationUrl()

Sets the notification URL

public setNotificationUrl(string $notificationUrl) : mixed
Parameters
$notificationUrl : string
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

setReleaseDate()

Set the releaseDate

public setReleaseDate(DateTime $releaseDate) : mixed
Parameters
$releaseDate : DateTime
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

setScripts()

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

setSourceMirrors()

public setSourceMirrors(array<string|int, mixed>|null $mirrors) : mixed
Parameters
$mirrors : array<string|int, mixed>|null
Return values
mixed

setSourceReference()

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

setSourceType()

public setSourceType(string $type) : mixed
Parameters
$type : string
Return values
mixed

setSourceUrl()

public setSourceUrl(string $url) : mixed
Parameters
$url : string
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

setSupport()

Set the support information

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

setTargetDir()

public setTargetDir(string $targetDir) : mixed
Parameters
$targetDir : string
Return values
mixed

setTransportOptions()

Configures the list of options to download package dist files

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

setType()

public setType(string $type) : mixed
Parameters
$type : string
Return values
mixed

getUrls()

protected getUrls(mixed $url, mixed $mirrors, mixed $ref, mixed $type, mixed $urlType) : mixed
Parameters
$url : mixed
$mirrors : mixed
$ref : mixed
$type : mixed
$urlType : mixed
Return values
mixed

Search results