Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Factory.php
Go to the documentation of this file.
1 <?php
7 
11 class Factory
12 {
18  protected $objectManager;
19 
25  protected $instanceName;
26 
33  public function __construct(
34  \Magento\Framework\ObjectManagerInterface $objectManager,
35  $instanceName = \Magento\Authorizenet\Model\Request::class
36  ) {
37  $this->objectManager = $objectManager;
38  $this->instanceName = $instanceName;
39  }
40 
47  public function create(array $data = [])
48  {
49  return $this->objectManager->create($this->instanceName, $data);
50  }
51 }
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName=\Magento\Authorizenet\Model\Request::class)
Definition: Factory.php:33