Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
UrlFactory.php
Go to the documentation of this file.
1 <?php
7 namespace Magento\Framework;
8 
9 class UrlFactory
10 {
14  protected $_objectManager = null;
15 
19  protected $_instanceName = null;
20 
25  public function __construct(
27  $instanceName = UrlInterface::class
28  ) {
29  $this->_objectManager = $objectManager;
30  $this->_instanceName = $instanceName;
31  }
32 
39  public function create(array $data = [])
40  {
41  return $this->_objectManager->create($this->_instanceName, $data);
42  }
43 }
$objectManager
Definition: bootstrap.php:17
__construct(ObjectManagerInterface $objectManager, $instanceName=UrlInterface::class)
Definition: UrlFactory.php:25