Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ClientFactory.php
Go to the documentation of this file.
1 <?php
7 
9 
11 {
17  protected $objectManager;
18 
22  private $clientClass;
23 
28  public function __construct(ObjectManagerInterface $objectManager, $clientClass)
29  {
30  $this->objectManager = $objectManager;
31  $this->clientClass = $clientClass;
32  }
33 
40  public function create(array $options = [])
41  {
42  return $this->objectManager->create(
43  $this->clientClass,
44  ['options' => $options]
45  );
46  }
47 }
__construct(ObjectManagerInterface $objectManager, $clientClass)