HEX
Server: Apache
System: Linux webm019.cluster128.gra.hosting.ovh.net 6.18.42-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Wed Aug 5 15:59:48 CEST 2026 x86_64
User: petsclubcc (68997)
PHP: 5.4.45
Disabled: _dyuweyrj4,_dyuweyrj4r,dl
Upload Files
File: /home/petsclubcc/magento/vendor/magento/framework/Module/FullModuleList.php
<?php
/**
 * Copyright © 2016 Magento. All rights reserved.
 * See COPYING.txt for license details.
 */
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 isset($data[$name]) ? $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]);
    }
}