PackageInfo.php 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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\Pear;
  12. /**
  13. * PEAR Package info
  14. *
  15. * @author Alexey Prilipko <palex@farpost.com>
  16. */
  17. class PackageInfo
  18. {
  19. private $channelName;
  20. private $packageName;
  21. private $license;
  22. private $shortDescription;
  23. private $description;
  24. private $releases;
  25. /**
  26. * @param string $channelName
  27. * @param string $packageName
  28. * @param string $license
  29. * @param string $shortDescription
  30. * @param string $description
  31. * @param ReleaseInfo[] $releases associative array maps release version to release info
  32. */
  33. public function __construct($channelName, $packageName, $license, $shortDescription, $description, $releases)
  34. {
  35. $this->channelName = $channelName;
  36. $this->packageName = $packageName;
  37. $this->license = $license;
  38. $this->shortDescription = $shortDescription;
  39. $this->description = $description;
  40. $this->releases = $releases;
  41. }
  42. /**
  43. * @return string the package channel name
  44. */
  45. public function getChannelName()
  46. {
  47. return $this->channelName;
  48. }
  49. /**
  50. * @return string the package name
  51. */
  52. public function getPackageName()
  53. {
  54. return $this->packageName;
  55. }
  56. /**
  57. * @return string the package description
  58. */
  59. public function getDescription()
  60. {
  61. return $this->description;
  62. }
  63. /**
  64. * @return string the package short escription
  65. */
  66. public function getShortDescription()
  67. {
  68. return $this->shortDescription;
  69. }
  70. /**
  71. * @return string the package licence
  72. */
  73. public function getLicense()
  74. {
  75. return $this->license;
  76. }
  77. /**
  78. * @return ReleaseInfo[]
  79. */
  80. public function getReleases()
  81. {
  82. return $this->releases;
  83. }
  84. }