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