/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/View/TemplateEnginePool.php
51 строка
973 B
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2014 Adobe * All Rights Reserved. */ namespace Magento\Framework\View; /** * @api * @since 100.0.2 */ class TemplateEnginePool { /** * Factory * * @var TemplateEngineFactory */ protected $factory; /** * Template engines * * @var \Magento\Framework\View\TemplateEngineInterface[] */ protected $engines = []; /** * Constructor * * @param TemplateEngineFactory $factory */ public function __construct(TemplateEngineFactory $factory) { $this->factory = $factory; } /** * Retrieve a template engine instance by its unique name * * @param string $name * @return \Magento\Framework\View\TemplateEngineInterface */ public function get($name) { if (!isset($this->engines[$name])) { $this->engines[$name] = $this->factory->create($name); } return $this->engines[$name]; } }