PublisherConnection.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\MessageQueue\Publisher\Config;
  7. /**
  8. * Representation of publisher connection configuration.
  9. */
  10. class PublisherConnection implements PublisherConnectionInterface
  11. {
  12. /**
  13. * Connection name.
  14. *
  15. * @var string
  16. */
  17. private $name;
  18. /**
  19. * Exchange name.
  20. *
  21. * @var string
  22. */
  23. private $exchange;
  24. /**
  25. * Flag. Is connection disabled.
  26. *
  27. * @var bool
  28. */
  29. private $isDisabled;
  30. /**
  31. * {@inheritdoc}
  32. */
  33. public function getName()
  34. {
  35. return $this->name;
  36. }
  37. /**
  38. * {@inheritdoc}
  39. */
  40. public function getExchange()
  41. {
  42. return $this->exchange;
  43. }
  44. /**
  45. * {@inheritdoc}
  46. */
  47. public function isDisabled()
  48. {
  49. return $this->isDisabled;
  50. }
  51. /**
  52. * {@inheritdoc}
  53. */
  54. public function setData(array $data)
  55. {
  56. $this->name = $data['name'];
  57. $this->exchange = $data['exchange'];
  58. $this->isDisabled = $data['disabled'];
  59. }
  60. }