ChannelInfo.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  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 channel info
  14. *
  15. * @author Alexey Prilipko <palex@farpost.com>
  16. */
  17. class ChannelInfo
  18. {
  19. private $name;
  20. private $alias;
  21. private $packages;
  22. /**
  23. * @param string $name
  24. * @param string $alias
  25. * @param PackageInfo[] $packages
  26. */
  27. public function __construct($name, $alias, array $packages)
  28. {
  29. $this->name = $name;
  30. $this->alias = $alias;
  31. $this->packages = $packages;
  32. }
  33. /**
  34. * Name of the channel
  35. *
  36. * @return string
  37. */
  38. public function getName()
  39. {
  40. return $this->name;
  41. }
  42. /**
  43. * Alias of the channel
  44. *
  45. * @return string
  46. */
  47. public function getAlias()
  48. {
  49. return $this->alias;
  50. }
  51. /**
  52. * List of channel packages
  53. *
  54. * @return PackageInfo[]
  55. */
  56. public function getPackages()
  57. {
  58. return $this->packages;
  59. }
  60. }