CoreFiles by mySites.guru
provider.php44 lines, 1,211 bytes, from Joomla_6.0.2-Stable-Full_Package.zip
Raw History Compare with 6.0.1
md5
1d91620602df035f083944f8934a2d97
sha1
e3e86ff045b45fa8646d7a761780fc748dbed94c
sha256
b321f58f2c59234403605a04a0aa64257880d4caf329f89e6ae9f845bc9bf6c1
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Installer.folderinstaller
 *
 * @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\Folder\Extension\FolderInstaller;

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 FolderInstaller(
                    (array) PluginHelper::getPlugin('installer', 'folderinstaller')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

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