Constants

MATCH_NAME

MATCH_NAME = -1

MATCH_NONE

MATCH_NONE = 0

MATCH

MATCH = 1

MATCH_PROVIDE

MATCH_PROVIDE = 2

MATCH_REPLACE

MATCH_REPLACE = 3

MATCH_FILTERED

MATCH_FILTERED = 4

Properties

$repositories

$repositories : 

Type

$providerRepos

$providerRepos : 

Type

$packages

$packages : 

Type

$packageByName

$packageByName : 

Type

$packageByExactName

$packageByExactName : 

Type

$acceptableStabilities

$acceptableStabilities : 

Type

$stabilityFlags

$stabilityFlags : 

Type

$versionParser

$versionParser : 

Type

$providerCache

$providerCache : 

Type

$filterRequires

$filterRequires : 

Type

$whitelist

$whitelist : 

Type

$id

$id : 

Type

Methods

__construct()

__construct(  $minimumStability = 'stable', array  $stabilityFlags = array(), array  $filterRequires = array()) 

Parameters

$minimumStability
array $stabilityFlags
array $filterRequires

setWhitelist()

setWhitelist(  $whitelist) 

Parameters

$whitelist

addRepository()

addRepository(\Composer\Repository\RepositoryInterface  $repo, array  $rootAliases = array()) 

Adds a repository and its packages to this package pool

Parameters

\Composer\Repository\RepositoryInterface $repo

A package repository

array $rootAliases

packageById()

packageById(integer  $id) : \Composer\Package\PackageInterface

Retrieves the package object for a given package id.

Parameters

integer $id

Returns

\Composer\Package\PackageInterface

count()

count() 

Returns how many packages have been loaded into the pool

whatProvides()

whatProvides(string  $name, \Composer\Semver\Constraint\ConstraintInterface  $constraint = null, boolean  $mustMatchName = false, boolean  $bypassFilters = false) : array<mixed,\Composer\Package\PackageInterface>

Searches all packages providing the given package name and match the constraint

Parameters

string $name

The package name to be searched for

\Composer\Semver\Constraint\ConstraintInterface $constraint

A constraint that all returned packages must match or null to return all

boolean $mustMatchName

Whether the name of returned packages must match the given name

boolean $bypassFilters

If enabled, filterRequires and stability matching is ignored

Returns

array<mixed,\Composer\Package\PackageInterface> —

A set of packages

literalToPackage()

literalToPackage(  $literal) 

Parameters

$literal

literalToPrettyString()

literalToPrettyString(  $literal,   $installedMap) 

Parameters

$literal
$installedMap

isPackageAcceptable()

isPackageAcceptable(  $name,   $stability) 

Parameters

$name
$stability

match()

match(\Composer\Package\PackageInterface  $candidate, string  $name, \Composer\Semver\Constraint\ConstraintInterface  $constraint = null,   $bypassFilters) : integer

Checks if the package matches the given constraint directly or through provided or replaced packages

Parameters

\Composer\Package\PackageInterface $candidate
string $name

Name of the package to be matched

\Composer\Semver\Constraint\ConstraintInterface $constraint

The constraint to verify

$bypassFilters

Returns

integer —

One of the MATCH* constants of this class or 0 if there is no match

computeWhatProvides()

computeWhatProvides(  $name,   $constraint,   $mustMatchName = false,   $bypassFilters = false) 

Parameters

$name
$constraint
$mustMatchName
$bypassFilters