CoreFiles by mySites.guru
provider.php49 lines, 1,377 bytes, from Joomla_4.3.2-Stable-Full_Package.zip
Raw History Compare with 4.3.1
md5
c2480d30f775d918d6b9932b6226ba5b
sha1
352ffd3f37fa6b71b0ede892f9d38f976dc5601e
sha256
b0da930ed47564313e982a872cdd4be7a60cc79a69261d8414dedc86f9062125
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Task.requests
 *
 * @copyright   (C) 2022 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\Event\DispatcherInterface;
use Joomla\Http\HttpFactory;
use Joomla\Plugin\Task\Requests\Extension\Requests;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   4.2.0
     */
    public function register(Container $container)
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $plugin = new Requests(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('task', 'requests'),
                    new HttpFactory(),
                    JPATH_ROOT . '/tmp'
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 60 releases, Joomla 4.3.0-beta1 to 5.0.0-beta3. See them all, or every version of this file.