$localRepository
$localRepository :
Repositories manager.
__construct(\Composer\IO\IOInterface $io, \Composer\Config $config, \Composer\EventDispatcher\EventDispatcher $eventDispatcher = null, \Composer\Util\RemoteFilesystem $rfs = null)
\Composer\IO\IOInterface | $io | |
\Composer\Config | $config | |
\Composer\EventDispatcher\EventDispatcher | $eventDispatcher | |
\Composer\Util\RemoteFilesystem | $rfs |
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.
string | $name | package name |
string|\Composer\Semver\Constraint\ConstraintInterface | $constraint | package version or version constraint to match against |
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.
string | $name | package name |
string|\Composer\Semver\Constraint\ConstraintInterface | $constraint | package version or version constraint to match against |
addRepository(\Composer\Repository\RepositoryInterface $repository)
Adds repository
\Composer\Repository\RepositoryInterface | $repository | repository instance |
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.
\Composer\Repository\RepositoryInterface | $repository | repository instance |
createRepository(string $type, array $config, string $name = null) : \Composer\Repository\RepositoryInterface
Returns a new repository for a specific installation type.
string | $type | repository type |
array | $config | repository configuration |
string | $name | repository name |
if repository for provided type is not registered
getRepositories() : array<mixed,\Composer\Repository\RepositoryInterface>
Returns all repositories, except local one.
setLocalRepository(\Composer\Repository\WritableRepositoryInterface $repository)
Sets local repository for the project.
\Composer\Repository\WritableRepositoryInterface | $repository | repository instance |
getLocalRepository() : \Composer\Repository\WritableRepositoryInterface
Returns local repository for the project.