/
githubmirror
/
magento2
Обзор
Документация
Войти
/
githubmirror
/
magento2
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.4-develop
lib/internal/Magento/Framework/Module/FullModuleList.php
78 строк
1 KB
Alexandra Zota
ACP2E-4019: CE copyright updates for 2.4.9-beta1
22 окт 2025, 17:47
22 окт 2025, 17:47
1b769b7
Код
Авторство
О чём код?
<?php /** * Copyright 2015 Adobe * All Rights Reserved. */ namespace Magento\Framework\Module; /** * A list of modules in the Magento application * * Represents all modules, regardless of enabled or not */ class FullModuleList implements ModuleListInterface { /** * Loader of module information from source code * * @var ModuleList\Loader */ private $loader; /** * Enumeration of the module names * * @var string[] */ private $data; /** * Constructor * * @param ModuleList\Loader $loader */ public function __construct(ModuleList\Loader $loader) { $this->loader = $loader; } /** * {@inheritdoc} * @see getNames() */ public function getAll() { if (null === $this->data) { $this->data = $this->loader->load(); } return $this->data; } /** * {@inheritdoc} * @see has() */ public function getOne($name) { $data = $this->getAll(); return $data[$name] ?? null; } /** * {@inheritdoc} */ public function getNames() { $data = $this->getAll(); return array_keys($data); } /** * {@inheritdoc} */ public function has($name) { $this->getAll(); return isset($this->data[$name]); } }