| Current Path : /home/rtorresani/www/app/code/Torresani/QrCodeRedirect/Model/ |
| Current File : //home/rtorresani/www/app/code/Torresani/QrCodeRedirect/Model/RedirectFactory.php |
<?php
namespace Torresani\QrCodeRedirect\Model;
use Magento\Framework\ObjectManagerInterface;
class RedirectFactory
{
protected $objectManager;
protected $instanceName;
public function __construct(
ObjectManagerInterface $objectManager,
$instanceName = '\Torresani\QrCodeRedirect\Model\Redirect'
) {
$this->objectManager = $objectManager;
$this->instanceName = $instanceName;
}
public function create(array $data = [])
{
return $this->objectManager->create($this->instanceName, $data);
}
}