Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SearchResultIteratorFactory.php
Go to the documentation of this file.
1 <?php
6 namespace Magento\Framework\Data;
7 
12 {
16  protected $objectManager;
17 
22  {
23  $this->objectManager = $objectManager;
24  }
25 
34  public function create($className, array $arguments = [])
35  {
36  $resultIterator = $this->objectManager->create($className, $arguments);
37  if (!$resultIterator instanceof \Traversable) {
38  throw new \Magento\Framework\Exception\LocalizedException(
39  new \Magento\Framework\Phrase('%1 should be an iterator', [$className])
40  );
41  }
42  return $resultIterator;
43  }
44 }
$arguments
__construct(\Magento\Framework\ObjectManagerInterface $objectManager)
if($currentSelectedMethod==$_code) $className
Definition: form.phtml:31