WritableRepositoryInterface.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /*
  3. * This file is part of Composer.
  4. *
  5. * (c) Nils Adermann <naderman@naderman.de>
  6. * Jordi Boggiano <j.boggiano@seld.be>
  7. *
  8. * For the full copyright and license information, please view the LICENSE
  9. * file that was distributed with this source code.
  10. */
  11. namespace Composer\Repository;
  12. use Composer\Package\PackageInterface;
  13. /**
  14. * Writable repository interface.
  15. *
  16. * @author Konstantin Kudryashov <ever.zet@gmail.com>
  17. */
  18. interface WritableRepositoryInterface extends RepositoryInterface
  19. {
  20. /**
  21. * Writes repository (f.e. to the disc).
  22. */
  23. public function write();
  24. /**
  25. * Adds package to the repository.
  26. *
  27. * @param PackageInterface $package package instance
  28. */
  29. public function addPackage(PackageInterface $package);
  30. /**
  31. * Removes package from the repository.
  32. *
  33. * @param PackageInterface $package package instance
  34. */
  35. public function removePackage(PackageInterface $package);
  36. /**
  37. * Forces a reload of all packages
  38. */
  39. public function reload();
  40. }