1
0
Fork 0

Added removePackage() to Repository\RepositoryInterface in order to provide to be able to rely on the existance of this method in all repositories. Had to add this method to the Repository\CompositeRepository.

pull/665/head
Paul Seiffert 2012-05-08 23:06:10 +02:00
parent 16941adb49
commit 7308049056
2 changed files with 18 additions and 0 deletions

View File

@ -91,6 +91,17 @@ class CompositeRepository implements RepositoryInterface
return call_user_func_array('array_merge', $packages);
}
/**
* {@inheritdoc}
*/
public function removePackage(PackageInterface $package)
{
foreach($this->repositories as $repository) {
/* @var $repository RepositoryInterface */
$repository->removePackage($package);
}
}
/**
* {@inheritdoc}
*/

View File

@ -57,4 +57,11 @@ interface RepositoryInterface extends \Countable
* @return array
*/
function getPackages();
/**
* @abstract
* @param \Composer\Package\PackageInterface $package
* @return void
*/
function removePackage(PackageInterface $package);
}