1
0
Fork 0
composer/src/Composer/Repository/RepositoryInterface.php

60 lines
1.3 KiB
PHP
Raw Normal View History

<?php
/*
* This file is part of Composer.
*
* (c) Nils Adermann <naderman@naderman.de>
2011-04-16 12:42:35 +00:00
* Jordi Boggiano <j.boggiano@seld.be>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
2011-04-17 21:32:53 +00:00
namespace Composer\Repository;
2011-09-25 12:44:05 +00:00
use Composer\Package\PackageInterface;
/**
2011-09-25 12:44:05 +00:00
* Repository interface.
*
* @author Nils Adermann <naderman@naderman.de>
2011-09-25 12:44:05 +00:00
* @author Konstantin Kudryashov <ever.zet@gmail.com>
*/
interface RepositoryInterface extends \Countable
{
2011-09-25 12:44:05 +00:00
/**
* Checks if specified package registered (installed).
*
* @param PackageInterface $package package instance
*
* @return Boolean
*/
function hasPackage(PackageInterface $package);
/**
* Searches for a package by it's name and version (if has one).
*
* @param string $name package name
* @param string $version package version
*
* @return PackageInterface|null
*/
function findPackage($name, $version);
/**
* Searches for packages by it's name .
*
* @param string $name package name
*
* @return array
*/
function findPackagesByName($name);
2011-09-25 12:44:05 +00:00
/**
* Returns list of registered packages.
*
* @return array
*/
function getPackages();
}