CoreFiles by mySites.guru
provider.php44 lines, 1,235 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
0f5a8e43aee837c1de3fa03ad909aadc
sha1
3222c2cb5718e1458f8ef407870eb231954ac843
sha256
7564ea1b23baed3373358531a61d9fa34cfddce73200f30ae2d529f268289c2e
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.urlinstaller
 *
 * @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\Installer\Url\Extension\UrlInstaller;

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)
    {
        $container->set(
            PluginInterface::class,
            $container->lazy(UrlInstaller::class, function (Container $container) {
                $plugin     = new UrlInstaller(
                    (array) PluginHelper::getPlugin('installer', 'urlinstaller')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            })
        );
    }
};

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