write()
write()
Writes repository (f.e. to the disc).
Installable repository interface.
Just used to tag installed repositories so the base classes can act differently on Alias packages
addPackage(\Composer\Package\PackageInterface $package)
Adds package to the repository.
\Composer\Package\PackageInterface | $package | package instance |
removePackage(\Composer\Package\PackageInterface $package)
Removes package from the repository.
\Composer\Package\PackageInterface | $package | package instance |
getCanonicalPackages() : array<mixed,\Composer\Package\PackageInterface>
Get unique packages (at most one package of each name), with aliases resolved and removed.
hasPackage(\Composer\Package\PackageInterface $package) : boolean
Checks if specified package registered (installed).
\Composer\Package\PackageInterface | $package | package instance |
findPackage(string $name, string|\Composer\Semver\Constraint\ConstraintInterface $constraint) : \Composer\Package\PackageInterface|null
Searches for the first match of a package by name and version.
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 = null) : array<mixed,\Composer\Package\PackageInterface>
Searches for all packages matching a name and optionally a version.
string | $name | package name |
string|\Composer\Semver\Constraint\ConstraintInterface | $constraint | package version or version constraint to match against |
getPackages() : array<mixed,\Composer\Package\PackageInterface>
Returns list of registered packages.
search(string $query, integer $mode) : array<mixed,array>
Searches the repository for packages containing the query
string | $query | search query |
integer | $mode | a set of SEARCH_* constants to search on, implementations should do a best effort only |
an array of array('name' => '...', 'description' => '...')