Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ConsumerConfigItem.php
Go to the documentation of this file.
1 <?php
7 
10 
15 {
19  private $name;
20 
24  private $connection;
25 
29  private $queue;
30 
34  private $consumerInstance;
35 
39  private $handlers;
40 
44  private $maxMessages;
45 
51  public function __construct(HandlerIteratorFactory $handlerIteratorFactory)
52  {
53  $this->handlers = $handlerIteratorFactory->create();
54  }
55 
59  public function getName()
60  {
61  return $this->name;
62  }
63 
67  public function getConnection()
68  {
69  return $this->connection;
70  }
71 
75  public function getQueue()
76  {
77  return $this->queue;
78  }
79 
83  public function getConsumerInstance()
84  {
85  return $this->consumerInstance;
86  }
87 
91  public function getHandlers()
92  {
93  return $this->handlers;
94  }
95 
99  public function getMaxMessages()
100  {
101  return $this->maxMessages;
102  }
103 
107  public function setData(array $data)
108  {
109  $this->name = $data['name'];
110  $this->connection = $data['connection'];
111  $this->queue = $data['queue'];
112  $this->consumerInstance = $data['consumerInstance'];
113  $this->maxMessages = $data['maxMessages'];
114  $this->handlers->setData($data['handlers']);
115  }
116 }
__construct(HandlerIteratorFactory $handlerIteratorFactory)