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
7 
12 {
18  private $objectManager = null;
19 
25  private $instanceName = null;
26 
33  public function __construct(
34  \Magento\Framework\ObjectManagerInterface $objectManager,
35  $instanceName = \Magento\MysqlMq\Model\Driver\Queue::class
36  ) {
37  $this->objectManager = $objectManager;
38  $this->instanceName = $instanceName;
39  }
40 
44  public function create($queueName, $connectionName)
45  {
46  return $this->objectManager->create(
47  $this->instanceName,
48  [
49  'queueName' => $queueName,
50  'connectionName' => $connectionName
51  ]
52  );
53  }
54 }
$objectManager
Definition: bootstrap.php:17
create($queueName, $connectionName)
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName=\Magento\MysqlMq\Model\Driver\Queue::class)