RootPackage.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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. * The root package represents the project's composer.json and contains additional metadata
  14. *
  15. * @author Jordi Boggiano <j.boggiano@seld.be>
  16. */
  17. class RootPackage extends CompletePackage implements RootPackageInterface
  18. {
  19. protected $minimumStability = 'stable';
  20. protected $preferStable = false;
  21. protected $stabilityFlags = array();
  22. protected $references = array();
  23. protected $aliases = array();
  24. /**
  25. * Set the minimumStability
  26. *
  27. * @param string $minimumStability
  28. */
  29. public function setMinimumStability($minimumStability)
  30. {
  31. $this->minimumStability = $minimumStability;
  32. }
  33. /**
  34. * {@inheritDoc}
  35. */
  36. public function getMinimumStability()
  37. {
  38. return $this->minimumStability;
  39. }
  40. /**
  41. * Set the stabilityFlags
  42. *
  43. * @param array $stabilityFlags
  44. */
  45. public function setStabilityFlags(array $stabilityFlags)
  46. {
  47. $this->stabilityFlags = $stabilityFlags;
  48. }
  49. /**
  50. * {@inheritDoc}
  51. */
  52. public function getStabilityFlags()
  53. {
  54. return $this->stabilityFlags;
  55. }
  56. /**
  57. * Set the preferStable
  58. *
  59. * @param bool $preferStable
  60. */
  61. public function setPreferStable($preferStable)
  62. {
  63. $this->preferStable = $preferStable;
  64. }
  65. /**
  66. * {@inheritDoc}
  67. */
  68. public function getPreferStable()
  69. {
  70. return $this->preferStable;
  71. }
  72. /**
  73. * Set the references
  74. *
  75. * @param array $references
  76. */
  77. public function setReferences(array $references)
  78. {
  79. $this->references = $references;
  80. }
  81. /**
  82. * {@inheritDoc}
  83. */
  84. public function getReferences()
  85. {
  86. return $this->references;
  87. }
  88. /**
  89. * Set the aliases
  90. *
  91. * @param array $aliases
  92. */
  93. public function setAliases(array $aliases)
  94. {
  95. $this->aliases = $aliases;
  96. }
  97. /**
  98. * {@inheritDoc}
  99. */
  100. public function getAliases()
  101. {
  102. return $this->aliases;
  103. }
  104. }