2011-09-25 12:44:05 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/*
|
|
|
|
* This file is part of Composer.
|
|
|
|
*
|
|
|
|
* (c) Nils Adermann <naderman@naderman.de>
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Composer\Repository;
|
|
|
|
|
|
|
|
use Composer\Package\PackageInterface;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Writable repository interface.
|
|
|
|
*
|
|
|
|
* @author Konstantin Kudryashov <ever.zet@gmail.com>
|
|
|
|
*/
|
|
|
|
interface WritableRepositoryInterface extends RepositoryInterface
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Writes repository (f.e. to the disc).
|
|
|
|
*/
|
2012-05-22 15:13:15 +00:00
|
|
|
public function write();
|
2011-09-25 12:44:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Adds package to the repository.
|
|
|
|
*
|
2012-05-22 10:07:08 +00:00
|
|
|
* @param PackageInterface $package package instance
|
2011-09-25 12:44:05 +00:00
|
|
|
*/
|
2012-05-22 15:13:15 +00:00
|
|
|
public function addPackage(PackageInterface $package);
|
2011-09-25 12:44:05 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Removes package from the repository.
|
|
|
|
*
|
2012-05-22 10:07:08 +00:00
|
|
|
* @param PackageInterface $package package instance
|
2011-09-25 12:44:05 +00:00
|
|
|
*/
|
2012-05-22 15:13:15 +00:00
|
|
|
public function removePackage(PackageInterface $package);
|
2012-04-15 17:05:16 +00:00
|
|
|
|
2013-04-28 20:32:46 +00:00
|
|
|
/**
|
|
|
|
* Get unique packages, with aliases resolved and removed
|
|
|
|
*
|
|
|
|
* @return PackageInterface[]
|
|
|
|
*/
|
|
|
|
public function getCanonicalPackages();
|
|
|
|
|
2012-04-15 17:05:16 +00:00
|
|
|
/**
|
|
|
|
* Forces a reload of all packages
|
|
|
|
*/
|
2012-05-22 15:13:15 +00:00
|
|
|
public function reload();
|
2011-09-25 12:44:05 +00:00
|
|
|
}
|