Pool
in package
implements
Countable
A package pool contains repositories that provide packages.
Tags
Interfaces, Classes and Traits
- Countable
Table of Contents
- MATCH = 1
- MATCH_FILTERED = 4
- MATCH_NAME = -1
- MATCH_NONE = 0
- MATCH_PROVIDE = 2
- MATCH_REPLACE = 3
- $acceptableStabilities : mixed
- $filterRequires : mixed
- $id : mixed
- $packageByExactName : mixed
- $packageByName : mixed
- $packages : mixed
- $providerCache : mixed
- $providerRepos : mixed
- $repositories : mixed
- $stabilityFlags : mixed
- $versionParser : mixed
- $whitelist : mixed
- __construct() : mixed
- addRepository() : mixed
- Adds a repository and its packages to this package pool
- count() : mixed
- Returns how many packages have been loaded into the pool
- getPriority() : mixed
- isPackageAcceptable() : mixed
- literalToPackage() : mixed
- literalToPrettyString() : mixed
- match() : int
- Checks if the package matches the given constraint directly or through provided or replaced packages
- packageById() : PackageInterface
- Retrieves the package object for a given package id.
- setAllowList() : mixed
- setWhitelist() : mixed
- whatProvides() : array<string|int, PackageInterface>
- Searches all packages providing the given package name and match the constraint
- computeWhatProvides() : mixed
Constants
MATCH
public
mixed
MATCH
= 1
MATCH_FILTERED
public
mixed
MATCH_FILTERED
= 4
MATCH_NAME
public
mixed
MATCH_NAME
= -1
MATCH_NONE
public
mixed
MATCH_NONE
= 0
MATCH_PROVIDE
public
mixed
MATCH_PROVIDE
= 2
MATCH_REPLACE
public
mixed
MATCH_REPLACE
= 3
Properties
$acceptableStabilities
protected
mixed
$acceptableStabilities
$filterRequires
protected
mixed
$filterRequires
$id
protected
mixed
$id
= 1
$packageByExactName
protected
mixed
$packageByExactName
= array()
$packageByName
protected
mixed
$packageByName
= array()
$packages
protected
mixed
$packages
= array()
$providerCache
protected
mixed
$providerCache
= array()
$providerRepos
protected
mixed
$providerRepos
= array()
$repositories
protected
mixed
$repositories
= array()
$stabilityFlags
protected
mixed
$stabilityFlags
$versionParser
protected
mixed
$versionParser
$whitelist
protected
mixed
$whitelist
= null
Methods
__construct()
public
__construct([mixed $minimumStability = 'stable' ][, array<string|int, mixed> $stabilityFlags = array() ][, array<string|int, mixed> $filterRequires = array() ]) : mixed
Parameters
- $minimumStability : mixed = 'stable'
- $stabilityFlags : array<string|int, mixed> = array()
- $filterRequires : array<string|int, mixed> = array()
Return values
mixed —addRepository()
Adds a repository and its packages to this package pool
public
addRepository(RepositoryInterface $repo[, array<string|int, mixed> $rootAliases = array() ]) : mixed
Parameters
- $repo : RepositoryInterface
-
A package repository
- $rootAliases : array<string|int, mixed> = array()
Return values
mixed —count()
Returns how many packages have been loaded into the pool
public
count() : mixed
Return values
mixed —getPriority()
public
getPriority(RepositoryInterface $repo) : mixed
Parameters
- $repo : RepositoryInterface
Return values
mixed —isPackageAcceptable()
public
isPackageAcceptable(mixed $name, mixed $stability) : mixed
Parameters
- $name : mixed
- $stability : mixed
Return values
mixed —literalToPackage()
public
literalToPackage(mixed $literal) : mixed
Parameters
- $literal : mixed
Return values
mixed —literalToPrettyString()
public
literalToPrettyString(mixed $literal, mixed $installedMap) : mixed
Parameters
- $literal : mixed
- $installedMap : mixed
Return values
mixed —match()
Checks if the package matches the given constraint directly or through provided or replaced packages
public
match(PackageInterface $candidate, string $name[, ConstraintInterface $constraint = null ], mixed $bypassFilters) : int
Parameters
- $candidate : PackageInterface
- $name : string
-
Name of the package to be matched
- $constraint : ConstraintInterface = null
-
The constraint to verify
- $bypassFilters : mixed
Return values
int —One of the MATCH* constants of this class or 0 if there is no match
packageById()
Retrieves the package object for a given package id.
public
packageById(int $id) : PackageInterface
Parameters
- $id : int
Return values
PackageInterface —setAllowList()
public
setAllowList(mixed $allowList) : mixed
Parameters
- $allowList : mixed
Return values
mixed —setWhitelist()
public
setWhitelist(mixed $whitelist) : mixed
Parameters
- $whitelist : mixed
Tags
Return values
mixed —whatProvides()
Searches all packages providing the given package name and match the constraint
public
whatProvides(string $name[, ConstraintInterface $constraint = null ][, bool $mustMatchName = false ][, bool $bypassFilters = false ]) : array<string|int, PackageInterface>
Parameters
- $name : string
-
The package name to be searched for
- $constraint : ConstraintInterface = null
-
A constraint that all returned packages must match or null to return all
- $mustMatchName : bool = false
-
Whether the name of returned packages must match the given name
- $bypassFilters : bool = false
-
If enabled, filterRequires and stability matching is ignored
Return values
array<string|int, PackageInterface> —A set of packages
computeWhatProvides()
private
computeWhatProvides(mixed $name, mixed $constraint[, mixed $mustMatchName = false ][, mixed $bypassFilters = false ]) : mixed
Parameters
- $name : mixed
- $constraint : mixed
- $mustMatchName : mixed = false
- $bypassFilters : mixed = false