CoreFiles by mySites.guru
provider.php41 lines, 1,131 bytes, from Joomla_6.0.0-Stable-Full_Package.zip
Raw History Compare with 5.4.10
md5
98247a2e1ab39133be09f98d44e4f33d
sha1
8417cf689ade0156cd0a2c5883c93ef560456b1c
sha256
6c5ccfde750d8715d83a341898b5477e925a7f669ef1fdc4b13c9f19eec6c202
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Behaviour.compat6
 *
 * @copyright   (C) 2025 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\Behaviour\Compat6\Extension\Compat6;

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

                return $plugin;
            }
        );
    }
};

The same content is in 43 releases, Joomla 5.4.0-beta2 to 6.1.0-alpha3. See them all, or every version of this file.