Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
ConstraintFactory.php
Go to the documentation of this file.
1 <?php
11 
13 {
19  protected $_objectManager = null;
20 
26  protected $_instanceName = null;
27 
34  public function __construct(
36  $instanceName = \Magento\Framework\Validator\Constraint::class
37  ) {
38  $this->_objectManager = $objectManager;
39  $this->_instanceName = $instanceName;
40  }
41 
49  public function create(array $data = [])
50  {
51  return $this->_objectManager->create($this->_instanceName, $data);
52  }
53 }
__construct(\Magento\Framework\ObjectManagerInterface $objectManager, $instanceName=\Magento\Framework\Validator\Constraint::class)
$objectManager
Definition: bootstrap.php:17