PHP Class Monorepo\Composer\MonorepoInstalledRepository

Inheritance: implements Composer\Repository\InstalledRepositoryInterface
Afficher le fichier Open project: beberlei/composer-monorepo-plugin

Méthodes publiques

Méthode Description
addPackage ( Composer\Package\PackageInterface $package ) Adds package to the repository.
count ( )
findPackage ( string $name, string $version ) : Composer\Package\PackageInterface | null Searches for the first match of a package by name and version.
findPackages ( string $name, string $version = null ) : array Searches for all packages matching a name and optionally a version.
getCanonicalPackages ( ) : Composer\Package\PackageInterface[] Get unique packages, with aliases resolved and removed
getPackages ( ) : array Returns list of registered packages.
hasPackage ( Composer\Package\PackageInterface $package ) : boolean Checks if specified package registered (installed).
reload ( ) Forces a reload of all packages
removePackage ( Composer\Package\PackageInterface $package ) Removes package from the repository.
search ( string $query, integer $mode ) : array[] Searches the repository for packages containing the query
write ( ) Writes repository (f.e. to the disc).

Method Details

addPackage() public méthode

Adds package to the repository.
public addPackage ( Composer\Package\PackageInterface $package )
$package Composer\Package\PackageInterface package instance

count() public méthode

public count ( )

findPackage() public méthode

Searches for the first match of a package by name and version.
public findPackage ( string $name, string $version ) : Composer\Package\PackageInterface | null
$name string package name
$version string package version
Résultat Composer\Package\PackageInterface | null

findPackages() public méthode

Searches for all packages matching a name and optionally a version.
public findPackages ( string $name, string $version = null ) : array
$name string package name
$version string package version
Résultat array

getCanonicalPackages() public méthode

Get unique packages, with aliases resolved and removed
public getCanonicalPackages ( ) : Composer\Package\PackageInterface[]
Résultat Composer\Package\PackageInterface[]

getPackages() public méthode

Returns list of registered packages.
public getPackages ( ) : array
Résultat array

hasPackage() public méthode

Checks if specified package registered (installed).
public hasPackage ( Composer\Package\PackageInterface $package ) : boolean
$package Composer\Package\PackageInterface package instance
Résultat boolean

reload() public méthode

Forces a reload of all packages
public reload ( )

removePackage() public méthode

Removes package from the repository.
public removePackage ( Composer\Package\PackageInterface $package )
$package Composer\Package\PackageInterface package instance

write() public méthode

Writes repository (f.e. to the disc).
public write ( )