RootAliasPackage.php 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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. * @author Jordi Boggiano <j.boggiano@seld.be>
  14. */
  15. class RootAliasPackage extends AliasPackage implements RootPackageInterface
  16. {
  17. public function __construct(RootPackageInterface $aliasOf, $version, $prettyVersion)
  18. {
  19. parent::__construct($aliasOf, $version, $prettyVersion);
  20. }
  21. /**
  22. * {@inheritDoc}
  23. */
  24. public function getAliases()
  25. {
  26. return $this->aliasOf->getAliases();
  27. }
  28. /**
  29. * {@inheritDoc}
  30. */
  31. public function getMinimumStability()
  32. {
  33. return $this->aliasOf->getMinimumStability();
  34. }
  35. /**
  36. * {@inheritDoc}
  37. */
  38. public function getStabilityFlags()
  39. {
  40. return $this->aliasOf->getStabilityFlags();
  41. }
  42. /**
  43. * {@inheritDoc}
  44. */
  45. public function getReferences()
  46. {
  47. return $this->aliasOf->getReferences();
  48. }
  49. /**
  50. * {@inheritDoc}
  51. */
  52. public function getPreferStable()
  53. {
  54. return $this->aliasOf->getPreferStable();
  55. }
  56. /**
  57. * {@inheritDoc}
  58. */
  59. public function setRequires(array $require)
  60. {
  61. return $this->aliasOf->setRequires($require);
  62. }
  63. /**
  64. * {@inheritDoc}
  65. */
  66. public function setDevRequires(array $devRequire)
  67. {
  68. return $this->aliasOf->setDevRequires($devRequire);
  69. }
  70. public function __clone()
  71. {
  72. parent::__clone();
  73. $this->aliasOf = clone $this->aliasOf;
  74. }
  75. }