Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
MapperFactory.php
Go to the documentation of this file.
1 <?php
7 namespace Magento\Framework\DB;
8 
14 {
18  protected $objectManager;
19 
24  {
25  $this->objectManager = $objectManager;
26  }
27 
36  public function create($className, array $arguments = [])
37  {
38  $mapper = $this->objectManager->create($className, $arguments);
39  if (!$mapper instanceof MapperInterface) {
40  throw new \Magento\Framework\Exception\LocalizedException(
41  new \Magento\Framework\Phrase(
42  '%1 doesn\'t implement \Magento\Framework\DB\MapperInterface',
43  [$className]
44  )
45  );
46  }
47  return $mapper;
48  }
49 }
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
create($className, array $arguments=[])
$arguments
if($currentSelectedMethod==$_code) $className
Definition: form.phtml:31