Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
QueueFactory Class Reference

Public Member Functions

 __construct (ObjectManagerInterface $objectManager, $type=Queue::class)
 
 create (array $arguments=[])
 

Detailed Description

Factory class for

See also
\Magento\Deploy\Process\Queue

Definition at line 15 of file QueueFactory.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( ObjectManagerInterface  $objectManager,
  $type = Queue::class 
)

Factory constructor

Parameters
ObjectManagerInterface$objectManager
string$type

Definition at line 37 of file QueueFactory.php.

38  {
39  $this->objectManager = $objectManager;
40  $this->type = $type;
41  }

Member Function Documentation

◆ create()

create ( array  $arguments = [])

Create class instance with specified parameters

Parameters
array$arguments
Returns
Queue
Exceptions
LocalizedException

Definition at line 50 of file QueueFactory.php.

51  {
52  $queue = $this->objectManager->create($this->type, $arguments);
53  if (!$queue instanceof Queue) {
54  throw new LocalizedException(
55  new Phrase("Wrong queue type specified.")
56  );
57  }
58  return $queue;
59  }
$queue
Definition: queue.php:21
$arguments

The documentation for this class was generated from the following file: