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
View
TemplateEngine
Xhtml
CompilerFactory.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\Framework\View\TemplateEngine\Xhtml
;
7
8
use
Magento\Framework\Phrase
;
9
use
Magento\Framework\ObjectManagerInterface
;
10
use
Magento\Framework\Exception\LocalizedException
;
11
15
class
CompilerFactory
16
{
22
protected
$objectManager
;
23
29
protected
$instanceName
;
30
37
public
function
__construct
(
ObjectManagerInterface
$objectManager
,
$instanceName
)
38
{
39
$this->objectManager =
$objectManager
;
40
$this->instanceName =
$instanceName
;
41
}
42
50
public
function
create
(array
$arguments
= [])
51
{
52
$object = $this->objectManager->create($this->instanceName,
$arguments
);
53
54
if
(!($object instanceof
CompilerInterface
)) {
55
throw
new
LocalizedException
(
new
Phrase
(
'This class must implement the "CompilerInterface"'
));
56
}
57
58
return
$object;
59
}
60
}
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\Framework\ObjectManagerInterface
Definition:
ObjectManagerInterface.php:12
Magento\Framework\View\TemplateEngine\Xhtml\CompilerInterface
Definition:
CompilerInterface.php:16
Magento\Framework\View\TemplateEngine\Xhtml\CompilerFactory\create
create(array $arguments=[])
Definition:
CompilerFactory.php:50
Magento\Framework\View\TemplateEngine\Xhtml\CompilerFactory
Definition:
CompilerFactory.php:15
Magento\Framework\View\TemplateEngine\Xhtml
$arguments
$arguments
Definition:
final_price.phtml:24
Magento\Framework\View\TemplateEngine\Xhtml\CompilerFactory\$instanceName
$instanceName
Definition:
CompilerFactory.php:29
Magento\Framework\Phrase
Definition:
Phrase.php:17
Magento\Framework\Phrase
Magento\Framework\View\TemplateEngine\Xhtml\CompilerFactory\$objectManager
$objectManager
Definition:
CompilerFactory.php:22
Magento\Framework\View\TemplateEngine\Xhtml\CompilerFactory\__construct
__construct(ObjectManagerInterface $objectManager, $instanceName)
Definition:
CompilerFactory.php:37