Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
QueueFactory.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Framework\Amqp;
7 
15 {
21  private $objectManager = null;
22 
28  private $instanceName = null;
29 
33  private $configPool;
34 
43  public function __construct(
44  \Magento\Framework\ObjectManagerInterface $objectManager,
45  ConfigPool $configPool,
46  $instanceName = \Magento\Framework\Amqp\Queue::class
47  ) {
48  $this->objectManager = $objectManager;
49  $this->configPool = $configPool;
50  $this->instanceName = $instanceName;
51  }
52 
57  public function create($queueName, $connectionName)
58  {
59  return $this->objectManager->create(
60  $this->instanceName,
61  [
62  'amqpConfig' => $this->configPool->get($connectionName),
63  'queueName' => $queueName
64  ]
65  );
66  }
67 }
$objectManager
Definition: bootstrap.php:17
create($queueName, $connectionName)
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, ConfigPool $configPool, $instanceName=\Magento\Framework\Amqp\Queue::class)