CoreFiles by mySites.guru
provider.php44 lines, 1,226 bytes, from Joomla_6.1.2-Stable-Full_Package.zip
Raw History Compare with 6.1.1
md5
c9711e3f6901116d3a7f842d18d0eb6c
sha1
ef4d2f74c77648e2d1ad5811f6178dfc6e9675c0
sha256
55e406b12e2efb22ba14330e4e2e3d98dca9aa705bd4fcaebed7c7bc9221a4ed
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Webservices.modules
 *
 * @copyright   (C) 2023 Open Source Matters, Inc. <https://www.joomla.org>
 * @license     GNU General Public License version 2 or later; see LICENSE.txt
 */

\defined('_JEXEC') or die;

use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\WebServices\Modules\Extension\Modules;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   4.4.0
     */
    public function register(Container $container): void
    {
        $container->set(
            PluginInterface::class,
            $container->lazy(Modules::class, function (Container $container) {
                $plugin     = new Modules(
                    (array) PluginHelper::getPlugin('webservices', 'modules')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            })
        );
    }
};

The same content is in 28 releases, Joomla 6.1.0-beta1 to 6.2.1-rc1. See them all, or every version of this file.