Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
framework
Controller
Router
Route
Factory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\Controller\Router\Route
;
7
8
use
Magento\Framework\App\RouterInterface
;
9
use
Magento\Framework\ObjectManagerInterface
as
ObjectManager
;
10
11
class
Factory
12
{
16
protected
$objectManager
;
17
21
public
function
__construct
(
ObjectManager
$objectManager
)
22
{
23
$this->objectManager =
$objectManager
;
24
}
25
34
public
function
createRoute
($routeClass, $route)
35
{
36
$route = $this->objectManager->create($routeClass, [
'route'
=> $route]);
37
if
(!$route instanceof
RouterInterface
) {
38
throw
new \LogicException(
'Route must implement "Magento\Framework\App\RouterInterface".'
);
39
}
40
return
$route;
41
}
42
}
Magento\Framework\Controller\Router\Route\Factory\$objectManager
$objectManager
Definition:
Factory.php:16
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\Controller\Router\Route\Factory
Definition:
Factory.php:11
Magento\Framework\Controller\Router\Route\Factory\createRoute
createRoute($routeClass, $route)
Definition:
Factory.php:34
Magento\Framework\Controller\Router\Route\Factory\__construct
__construct(ObjectManager $objectManager)
Definition:
Factory.php:21
Magento\Framework\Controller\Router\Route
Definition:
Factory.php:6
Magento\Framework\App\ObjectManager
Definition:
ObjectManager.php:20
Magento\Framework\App\RouterInterface
Definition:
RouterInterface.php:14