QueueConfigItem.php 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <?php
  2. /**
  3. * Copyright © Magento, Inc. All rights reserved.
  4. * See COPYING.txt for license details.
  5. */
  6. namespace Magento\Framework\MessageQueue\Topology\Config;
  7. /**
  8. * Instances of this class represent queue config items.
  9. */
  10. class QueueConfigItem implements QueueConfigItemInterface
  11. {
  12. /**
  13. * Queue name.
  14. *
  15. * @var string
  16. */
  17. private $name;
  18. /**
  19. * Connection name.
  20. *
  21. * @var string
  22. */
  23. private $connection;
  24. /**
  25. * Queue arguments.
  26. *
  27. * @var array
  28. */
  29. private $arguments;
  30. /**
  31. * Flag. Is queue durable.
  32. *
  33. * @var bool
  34. */
  35. private $isDurable;
  36. /**
  37. * Flag. Is auto-delete
  38. *
  39. * @var bool
  40. */
  41. private $isAutoDelete;
  42. /**
  43. * {@inheritdoc}
  44. */
  45. public function getName()
  46. {
  47. return $this->name;
  48. }
  49. /**
  50. * {@inheritdoc}
  51. */
  52. public function getConnection()
  53. {
  54. return $this->connection;
  55. }
  56. /**
  57. * {@inheritdoc}
  58. */
  59. public function getArguments()
  60. {
  61. return $this->arguments;
  62. }
  63. /**
  64. * {@inheritdoc}
  65. */
  66. public function isDurable()
  67. {
  68. return $this->isDurable;
  69. }
  70. /**
  71. * {@inheritdoc}
  72. */
  73. public function isAutoDelete()
  74. {
  75. return $this->isAutoDelete;
  76. }
  77. /**
  78. * Set exchange config item data.
  79. *
  80. * @param array $data
  81. * @return void
  82. */
  83. public function setData(array $data)
  84. {
  85. $this->name = $data['name'];
  86. $this->connection = $data['connection'];
  87. $this->isDurable = $data['durable'];
  88. $this->isAutoDelete = $data['autoDelete'];
  89. $this->arguments = $data['arguments'];
  90. }
  91. }