CoreFiles by mySites.guru
provider.php44 lines, 1,213 bytes, from Joomla_5.3.4-Stable-Full_Package.zip
Raw History Compare with 5.3.3
md5
b788146e180311ceacd7d3972cc35dd0
sha1
5c6eb826d597442250a6524063b38a006af2f12d
sha256
7ccb9c772116cc3669f53be62f8db7226d5df2539f6205e39b43d9f845a7f665
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  System.languagecode
 *
 * @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\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\System\LanguageCode\Extension\LanguageCode;

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,
            function (Container $container) {
                $plugin     = new LanguageCode(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('system', 'languagecode')
                );

                return $plugin;
            }
        );
    }
};

The same content is in 23 releases, Joomla 5.3.0-beta1 to 6.0.0-beta1. See them all, or every version of this file.