Binding.php 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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\ExchangeConfigItem;
  7. /**
  8. * Instances of this class represent config binding items declared in etc/queue_topology.xsd
  9. */
  10. class Binding implements BindingInterface
  11. {
  12. /**
  13. * Binding id.
  14. *
  15. * @var string
  16. */
  17. private $id;
  18. /**
  19. * Binding destination type.
  20. *
  21. * @var string
  22. */
  23. private $destinationType;
  24. /**
  25. * Binding destination.
  26. *
  27. * @var string
  28. */
  29. private $destination;
  30. /**
  31. * Flag. Is binding disabled.
  32. * @var bool
  33. */
  34. private $isDisabled;
  35. /**
  36. * Topic name.
  37. *
  38. * @var string
  39. */
  40. private $topic;
  41. /**
  42. * Binding arguments.
  43. *
  44. * @var array
  45. */
  46. private $arguments;
  47. /**
  48. * {@inheritdoc}
  49. */
  50. public function getId()
  51. {
  52. return $this->id;
  53. }
  54. /**
  55. * {@inheritdoc}
  56. */
  57. public function getDestinationType()
  58. {
  59. return $this->destinationType;
  60. }
  61. /**
  62. * {@inheritdoc}
  63. */
  64. public function getDestination()
  65. {
  66. return $this->destination;
  67. }
  68. /**
  69. * {@inheritdoc}
  70. */
  71. public function isDisabled()
  72. {
  73. return $this->isDisabled;
  74. }
  75. /**
  76. * {@inheritdoc}
  77. */
  78. public function getTopic()
  79. {
  80. return $this->topic;
  81. }
  82. /**
  83. * {@inheritdoc}
  84. */
  85. public function getArguments()
  86. {
  87. return $this->arguments;
  88. }
  89. /**
  90. * Set binding data.
  91. *
  92. * @param array $data
  93. * @return void
  94. */
  95. public function setData(array $data)
  96. {
  97. $this->id = $data['id'];
  98. $this->destinationType = $data['destinationType'];
  99. $this->destination = $data['destination'];
  100. $this->arguments = $data['arguments'];
  101. $this->topic = $data['topic'];
  102. $this->isDisabled = $data['disabled'];
  103. }
  104. }