CoreFiles by mySites.guru
provider.php47 lines, 1,337 bytes, from Joomla_5.0.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha4
md5
16e7f4ff116103facaaf3172f939a454
sha1
34bb4349e177cf2b02717dc50220e815feb27da8
sha256
dcb4704a9a107d1eba867e1d0c5b552ba2058d82d4a01a8b3bde49545f81b393
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Webservices.plugins
 *
 * @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\Event\DispatcherInterface;
use Joomla\Plugin\WebServices\Plugins\Extension\Plugins;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   5.0.0
     */
    public function register(Container $container): void
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $dispatcher = $container->get(DispatcherInterface::class);
                $plugin     = new Plugins(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('webservices', 'plugins')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

No other release has this exact content. See every version of this file.