CoreFiles by mySites.guru
provider.php47 lines, 1,347 bytes, from Joomla_5.0.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha4
md5
4ee6ba0d1d90467a77584f9e04f37b0f
sha1
6467cdcaeb1ec7eda711560db5a4ac4b749a5607
sha256
6e13b222b2dc94f1b7080dc717690c08b79280086dccbb3b926dccd9b1b7c40b
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Webservices.languages
 *
 * @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\Languages\Extension\Languages;

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 Languages(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('webservices', 'languages')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

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