RootPackageInterface.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  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\Package;
  12. /**
  13. * Defines additional fields that are only needed for the root package
  14. *
  15. * @author Jordi Boggiano <j.boggiano@seld.be>
  16. */
  17. interface RootPackageInterface extends CompletePackageInterface
  18. {
  19. /**
  20. * Returns a set of package names and theirs aliases
  21. *
  22. * @return array
  23. */
  24. public function getAliases();
  25. /**
  26. * Returns the minimum stability of the package
  27. *
  28. * @return string
  29. */
  30. public function getMinimumStability();
  31. /**
  32. * Returns the stability flags to apply to dependencies
  33. *
  34. * array('foo/bar' => 'dev')
  35. *
  36. * @return array
  37. */
  38. public function getStabilityFlags();
  39. /**
  40. * Returns a set of package names and source references that must be enforced on them
  41. *
  42. * array('foo/bar' => 'abcd1234')
  43. *
  44. * @return array
  45. */
  46. public function getReferences();
  47. /**
  48. * Returns true if the root package prefers picking stable packages over unstable ones
  49. *
  50. * @return bool
  51. */
  52. public function getPreferStable();
  53. /**
  54. * Set the required packages
  55. *
  56. * @param array $requires A set of package links
  57. */
  58. public function setRequires(array $requires);
  59. /**
  60. * Set the recommended packages
  61. *
  62. * @param array $devRequires A set of package links
  63. */
  64. public function setDevRequires(array $devRequires);
  65. }