Documentation

InstalledRepositoryInterface extends WritableRepositoryInterface

Installable repository interface.

Just used to tag installed repositories so the base classes can act differently on Alias packages

Tags
author

Jordi Boggiano j.boggiano@seld.be

Table of Contents

SEARCH_FULLTEXT  = 0
SEARCH_NAME  = 1
addPackage()  : mixed
Adds package to the repository.
findPackage()  : PackageInterface|null
Searches for the first match of a package by name and version.
findPackages()  : array<string|int, PackageInterface>
Searches for all packages matching a name and optionally a version.
getCanonicalPackages()  : array<string|int, PackageInterface>
Get unique packages (at most one package of each name), with aliases resolved and removed.
getPackages()  : array<string|int, PackageInterface>
Returns list of registered packages.
hasPackage()  : bool
Checks if specified package registered (installed).
reload()  : mixed
Forces a reload of all packages.
removePackage()  : mixed
Removes package from the repository.
search()  : array<string|int, array<string|int, mixed>>
Searches the repository for packages containing the query
write()  : mixed
Writes repository (f.e. to the disc).

Constants

Methods

Searches the repository for packages containing the query

public search(string $query, int $mode) : array<string|int, array<string|int, mixed>>
Parameters
$query : string

search query

$mode : int

a set of SEARCH_* constants to search on, implementations should do a best effort only

Return values
array<string|int, array<string|int, mixed>>

an array of array('name' => '...', 'description' => '...')

Search results