CoreFiles by mySites.guru
provider.php44 lines, 1,196 bytes, from Joomla_5.4.4-Stable-Full_Package.zip
Raw History Compare with 5.4.3
md5
122ee8d04f3ed0757902dcc3478f738b
sha1
e378853be9ded2a4b910c5b53e08725b22746c3f
sha256
1a6ea918127a3731580638dbd6de06816f29f2b252624deb177599623b5f0689
<?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,
            function (Container $container) {
                $plugin     = new UrlInstaller(
                    (array) PluginHelper::getPlugin('installer', 'urlinstaller')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 44 releases, Joomla 5.4.0-beta2 to 6.1.0-alpha3. See them all, or every version of this file.