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 namespace Magento\Framework\HTTP;
8 
15 {
21  protected $_objectManager = null;
22 
28  protected $_instanceName = null;
29 
36  public function __construct(
38  $instanceName = \Magento\Framework\HTTP\Client\Curl::class
39  ) {
40  $this->_objectManager = $objectManager;
41  $this->_instanceName = $instanceName;
42  }
43 
50  public function create(array $data = [])
51  {
52  return $this->_objectManager->create($this->_instanceName, $data);
53  }
54 }
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName=\Magento\Framework\HTTP\Client\Curl::class)
$objectManager
Definition: bootstrap.php:17