Documentation

Package extends BasePackage
in package

Core package definitions that are needed to resolve dependencies and install packages

Tags
author

Nils Adermann naderman@naderman.de

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
$archiveExcludes  : mixed
$autoload  : mixed
$binaries  : mixed
$conflicts  : array<string|int, Link>
$dev  : mixed
$devAutoload  : mixed
$devRequires  : array<string|int, Link>
$distMirrors  : mixed
$distReference  : mixed
$distSha1Checksum  : mixed
$distType  : mixed
$distUrl  : mixed
$extra  : mixed
$includePaths  : mixed
$installationSource  : mixed
$name  : string
$notificationUrl  : mixed
$prettyName  : string
$prettyVersion  : mixed
$provides  : array<string|int, Link>
$releaseDate  : mixed
$replaces  : array<string|int, Link>
$repository  : RepositoryInterface
$requires  : array<string|int, Link>
$sourceMirrors  : mixed
$sourceReference  : mixed
$sourceType  : mixed
$sourceUrl  : mixed
$stability  : mixed
$suggests  : mixed
$targetDir  : mixed
$transportOptions  : array<string|int, mixed>
$type  : mixed
$version  : mixed
__clone()  : mixed
__construct()  : mixed
Creates a new in memory package.
__toString()  : string
Converts the package into a readable and unique string
equals()  : mixed
getArchiveExcludes()  : mixed
{@inheritDoc}
getAutoload()  : mixed
{@inheritDoc}
getBinaries()  : mixed
{@inheritDoc}
getConflicts()  : mixed
{@inheritDoc}
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
getId()  : int
Retrieves the package's id set through setId
getIncludePaths()  : mixed
{@inheritDoc}
getInstallationSource()  : mixed
{@inheritDoc}
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}
getReplaces()  : mixed
{@inheritDoc}
getRepository()  : RepositoryInterface
Returns a reference to the repository that owns the package
getRequires()  : mixed
{@inheritDoc}
getSourceMirrors()  : mixed
{@inheritDoc}
getSourceReference()  : mixed
{@inheritDoc}
getSourceType()  : mixed
{@inheritDoc}
getSourceUrl()  : mixed
{@inheritDoc}
getSourceUrls()  : mixed
{@inheritDoc}
getStability()  : mixed
{@inheritDoc}
getStabilityPriority()  : mixed
getSuggests()  : mixed
{@inheritDoc}
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}
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.
setArchiveExcludes()  : mixed
Sets a list of patterns to be excluded from archives
setAutoload()  : mixed
Set the autoload mapping
setBinaries()  : mixed
setConflicts()  : mixed
Set the conflicting packages
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
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}
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
setRepository()  : mixed
Stores a reference to the repository that owns the package
setRequires()  : mixed
Set the required packages
setSourceMirrors()  : mixed
setSourceReference()  : mixed
setSourceType()  : mixed
setSourceUrl()  : mixed
setSuggests()  : mixed
Set the suggested packages
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()

Creates a new in memory package.

public __construct(string $name, string $version, string $prettyVersion) : mixed
Parameters
$name : string

The package's name

$version : string

The package's version

$prettyVersion : string

The package's non-normalized version

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

getAutoload()

{@inheritDoc}

public getAutoload() : mixed
Return values
mixed

getBinaries()

{@inheritDoc}

public getBinaries() : mixed
Return values
mixed

getConflicts()

{@inheritDoc}

public getConflicts() : mixed
Return values
mixed

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

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

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

getReplaces()

{@inheritDoc}

public getReplaces() : mixed
Return values
mixed

getRequires()

{@inheritDoc}

public getRequires() : mixed
Return values
mixed

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

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

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

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

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

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

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

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

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

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

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