Composer API
Class

Composer\Repository\BaseRepository

abstract class BaseRepository implements RepositoryInterface

Common ancestor class for generic repository functionality.

Methods

array getDependents(string|string[] $needle, ConstraintInterface|null $constraint = null, bool $invert = false, bool $recurse = true, string[] $packagesFound = null)

Returns a list of links causing the requested needle packages to be installed, as an associative array with the dependent's name as key, and an array containing in order the PackageInterface and Link describing the relationship as values.

Details

at line 40
public array getDependents(string|string[] $needle, ConstraintInterface|null $constraint = null, bool $invert = false, bool $recurse = true, string[] $packagesFound = null)

Returns a list of links causing the requested needle packages to be installed, as an associative array with the dependent's name as key, and an array containing in order the PackageInterface and Link describing the relationship as values.

If recursive lookup was requested a third value is returned containing an identically formed array up to the root package. That third value will be false in case a circular recursion was detected.

Parameters

string|string[] $needle The package name(s) to inspect.
ConstraintInterface|null $constraint Optional constraint to filter by.
bool $invert Whether to invert matches to discover reasons for the package NOT to be installed.
bool $recurse Whether to recursively expand the requirement tree up to the root package.
string[] $packagesFound Used internally when recurring

Return Value

array An associative array of arrays as described above.