Documentation

RepositoryInterface extends Countable

Repository interface.

Tags
author

Nils Adermann naderman@naderman.de

author

Konstantin Kudryashov ever.zet@gmail.com

author

Jordi Boggiano j.boggiano@seld.be

Table of Contents

SEARCH_FULLTEXT  = 0
SEARCH_NAME  = 1
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.
getPackages()  : array<string|int, PackageInterface>
Returns list of registered packages.
hasPackage()  : bool
Checks if specified package registered (installed).
search()  : array<string|int, array<string|int, mixed>>
Searches the repository for packages containing the query

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