Documentation

RepositoryManager
in package

Repositories manager.

Tags
author

Jordi Boggiano j.boggiano@seld.be

author

Konstantin Kudryashov ever.zet@gmail.com

author

François Pluchino francois.pluchino@opendisplay.com

Table of Contents

$config  : mixed
$eventDispatcher  : mixed
$io  : mixed
$localRepository  : mixed
$repositories  : mixed
$repositoryClasses  : mixed
$rfs  : mixed
__construct()  : mixed
addRepository()  : mixed
Adds repository
createRepository()  : RepositoryInterface
Returns a new repository for a specific installation type.
findPackage()  : PackageInterface|null
Searches for a package by it's name and version in managed repositories.
findPackages()  : array<string|int, PackageInterface>
Searches for all packages matching a name and optionally a version in managed repositories.
getLocalRepository()  : WritableRepositoryInterface
Returns local repository for the project.
getRepositories()  : array<string|int, RepositoryInterface>
Returns all repositories, except local one.
prependRepository()  : mixed
Adds a repository to the beginning of the chain
setLocalRepository()  : mixed
Sets local repository for the project.
setRepositoryClass()  : mixed
Stores repository class for a specific installation type.

Properties

Methods

createRepository()

Returns a new repository for a specific installation type.

public createRepository(string $type, array<string|int, mixed> $config[, string $name = null ]) : RepositoryInterface
Parameters
$type : string

repository type

$config : array<string|int, mixed>

repository configuration

$name : string = null

repository name

Tags
throws
InvalidArgumentException

if repository for provided type is not registered

Return values
RepositoryInterface

prependRepository()

Adds a repository to the beginning of the chain

public prependRepository(RepositoryInterface $repository) : mixed

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

Parameters
$repository : RepositoryInterface

repository instance

Return values
mixed

setRepositoryClass()

Stores repository class for a specific installation type.

public setRepositoryClass(string $type, string $class) : mixed
Parameters
$type : string

installation type

$class : string

class name of the repo implementation

Return values
mixed

Search results