\Composer\RepositoryRepositoryManager

Repositories manager.

Summary

Methods
Properties
Constants
__construct()
findPackage()
findPackages()
addRepository()
prependRepository()
createRepository()
setRepositoryClass()
getRepositories()
setLocalRepository()
getLocalRepository()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$localRepository
$repositories
$repositoryClasses
$io
$config
$eventDispatcher
$rfs
N/A

Properties

$localRepository

$localRepository : 

Type

$repositories

$repositories : 

Type

$repositoryClasses

$repositoryClasses : 

Type

$io

$io : 

Type

$config

$config : 

Type

$eventDispatcher

$eventDispatcher : 

Type

$rfs

$rfs : 

Type

Methods

findPackage()

findPackage(string  $name, string|\Composer\Semver\Constraint\ConstraintInterface  $constraint) : \Composer\Package\PackageInterface|null

Searches for a package by it's name and version in managed repositories.

Parameters

string $name

package name

string|\Composer\Semver\Constraint\ConstraintInterface $constraint

package version or version constraint to match against

Returns

\Composer\Package\PackageInterface|null

findPackages()

findPackages(string  $name, string|\Composer\Semver\Constraint\ConstraintInterface  $constraint) : array<mixed,\Composer\Package\PackageInterface>

Searches for all packages matching a name and optionally a version in managed repositories.

Parameters

string $name

package name

string|\Composer\Semver\Constraint\ConstraintInterface $constraint

package version or version constraint to match against

Returns

array<mixed,\Composer\Package\PackageInterface>

prependRepository()

prependRepository(\Composer\Repository\RepositoryInterface  $repository) 

Adds a repository to the beginning of the chain

This is useful when injecting additional repositories that should trump Packagist, e.g. from a plugin.

Parameters

\Composer\Repository\RepositoryInterface $repository

repository instance

createRepository()

createRepository(string  $type, array  $config, string  $name = null) : \Composer\Repository\RepositoryInterface

Returns a new repository for a specific installation type.

Parameters

string $type

repository type

array $config

repository configuration

string $name

repository name

Throws

\InvalidArgumentException

if repository for provided type is not registered

Returns

\Composer\Repository\RepositoryInterface

setRepositoryClass()

setRepositoryClass(string  $type, string  $class) 

Stores repository class for a specific installation type.

Parameters

string $type

installation type

string $class

class name of the repo implementation