Composer API
Class

Composer\DependencyResolver\Pool

class Pool implements Countable

A package pool contains repositories that provide packages.

Constants

MATCH_NAME

MATCH_NONE

MATCH

MATCH_PROVIDE

MATCH_REPLACE

MATCH_FILTERED

Methods

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

setWhitelist($whitelist)

addRepository(RepositoryInterface $repo, array $rootAliases = array())

Adds a repository and its packages to this package pool

getPriority(RepositoryInterface $repo)

PackageInterface packageById(int $id)

Retrieves the package object for a given package id.

count()

Returns how many packages have been loaded into the pool

PackageInterface[] whatProvides(string $name, ConstraintInterface $constraint = null, bool $mustMatchName = false, bool $bypassFilters = false)

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

literalToPackage($literal)

literalToPrettyString($literal, $installedMap)

isPackageAcceptable($name, $stability)

Details

at line 56
public __construct($minimumStability = 'stable', array $stabilityFlags = array(), array $filterRequires = array())

Parameters

$minimumStability
array $stabilityFlags
array $filterRequires

at line 74
public setWhitelist($whitelist)

Parameters

$whitelist

at line 86
public addRepository(RepositoryInterface $repo, array $rootAliases = array())

Adds a repository and its packages to this package pool

Parameters

RepositoryInterface $repo A package repository
array $rootAliases

at line 141
public getPriority(RepositoryInterface $repo)

Parameters

RepositoryInterface $repo

at line 158
public PackageInterface packageById(int $id)

Retrieves the package object for a given package id.

Parameters

int $id

Return Value

PackageInterface

at line 166
public count()

Returns how many packages have been loaded into the pool

at line 182
public PackageInterface[] whatProvides(string $name, ConstraintInterface $constraint = null, bool $mustMatchName = false, bool $bypassFilters = false)

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

Parameters

string $name The package name to be searched for
ConstraintInterface $constraint A constraint that all returned packages must match or null to return all
bool $mustMatchName Whether the name of returned packages must match the given name
bool $bypassFilters If enabled, filterRequires and stability matching is ignored

Return Value

PackageInterface[] A set of packages

at line 279
public literalToPackage($literal)

Parameters

$literal

at line 286
public literalToPrettyString($literal, $installedMap)

Parameters

$literal
$installedMap

at line 299
public isPackageAcceptable($name, $stability)

Parameters

$name
$stability