CoreFiles by mySites.guru
provider.php47 lines, 1,354 bytes, from Joomla_6.3.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 6.2.0-alpha3
md5
15dc0731554a39ecde7a4ca1cf8e04b9
sha1
28df2054520e270511a4fac4905908c110f26fe6
sha256
2960285e737393bc62fb718be5542b298ea239ab10795a3cfea43127f2db73e7
<?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\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,
            $container->lazy(Requests::class, function (Container $container) {
                $plugin = new Requests(
                    (array) PluginHelper::getPlugin('task', 'requests'),
                    new HttpFactory(),
                    Factory::getApplication()->get('tmp_path', JPATH_ROOT . '/tmp')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            })
        );
    }
};

The same content is in 2 releases, Joomla 6.2.1 to 6.3.0-alpha1. See them all, or every version of this file.