Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
SearchCriteriaFactory.php
Go to the documentation of this file.
1 <?php
7 
9 {
15  protected $_objectManager;
16 
22  protected $_instanceName = null;
23 
28  public function __construct(
30  $instanceName = \Magento\Framework\Api\Search\SearchCriteria::class
31  ) {
32  $this->_objectManager = $objectManager;
33  $this->_instanceName = $instanceName;
34  }
35 
42  public function create(array $data = [])
43  {
44  return $this->_objectManager->create($this->_instanceName, $data);
45  }
46 }
$objectManager
Definition: bootstrap.php:17
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName=\Magento\Framework\Api\Search\SearchCriteria::class)