mirror of
https://github.com/composer/composer
synced 2025-05-11 09:32:55 +00:00
Enhanced repository interface
This commit is contained in:
parent
123f5fef77
commit
9f98ee25ea
2 changed files with 66 additions and 0 deletions
|
@ -12,10 +12,34 @@
|
|||
|
||||
namespace Composer\Repository;
|
||||
|
||||
use Composer\Package\PackageInterface;
|
||||
|
||||
/**
|
||||
* Repository interface.
|
||||
*
|
||||
* @author Nils Adermann <naderman@naderman.de>
|
||||
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
||||
*/
|
||||
interface RepositoryInterface extends \Countable
|
||||
{
|
||||
/**
|
||||
* Initializes repository (reads file, opens connection).
|
||||
*/
|
||||
function initialize();
|
||||
|
||||
/**
|
||||
* Checks if specified package registered (installed).
|
||||
*
|
||||
* @param PackageInterface $package package instance
|
||||
*
|
||||
* @return Boolean
|
||||
*/
|
||||
function hasPackage(PackageInterface $package);
|
||||
|
||||
/**
|
||||
* Returns list of registered packages.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
function getPackages();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue