CoreFiles by mySites.guru
provider.php44 lines, 1,238 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
5ec96a9c0c275f6aa3df7b033ab56441
sha1
5616053e718fb8ad100125b99aa914c69f0a98b8
sha256
96c740cefc7f10a84103ae619aa0c122dec1ce5c9a0007fb2732b6ac18987701
<?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\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   4.4.0
     */
    public function register(Container $container): void
    {
        $container->set(
            PluginInterface::class,
            $container->lazy(Languages::class, function (Container $container) {
                $plugin     = new Languages(
                    (array) PluginHelper::getPlugin('webservices', 'languages')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            })
        );
    }
};

The same content is in 28 releases, Joomla 6.1.0-beta1 to 6.2.1-rc1. See them all, or every version of this file.