Magento 2 Object Manager

Magento 2 Object Manager is a PHP class responsible for creating and retrieving objects in Magento 2. It also manages to create factories and proxies. To get the object manager instance use the code: <?php $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); Using the ObjectManager you can get a singleton object (method “get”) of PHP class or create a new…
Read More

How to use curl in Magento 2

We will be learning here, how one can use curl in Magento 2. At first, you need to create an instance of “\Magento\Framework\HTTP\Client\Curl” in the Constructor as shown below: /** * @var \Magento\Framework\HTTP\Client\Curl */ protected $_curl; /** * Data constructor. * * @param \Magento\Framework\App\Helper\Context $context * @param \Magento\Framework\HTTP\Client\Curl $curl */ public function…
Read More