- md5
- 78ade915320af4c4bfd6bfeadbff72af
- sha1
- 0f119e871962a7d0105f15cc5560b0d1ee26e068
- sha256
- 1493e2054a50a6ed7d173ed51410d79681dc1aba506576dae644885379a40bac
<?php
/**
* @package Joomla.Plugin
* @subpackage System.compat
*
* @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\CMS\Profiler\Profiler;
use Joomla\CMS\Router\SiteRouter;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\System\Compat\Extension\Compat;
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)
{
$container->set(
PluginInterface::class,
function (Container $container) {
$plugin = PluginHelper::getPlugin('system', 'compat');
$dispatcher = $container->get(DispatcherInterface::class);
$profiler = (defined('JDEBUG') && JDEBUG) ? Profiler::getInstance('Application') : null;
$router = $container->has(SiteRouter::class) ? $container->get(SiteRouter::class) : null;
$plugin = new Compat($dispatcher, (array) $plugin, $profiler, $router);
$plugin->setApplication(Factory::getApplication());
return $plugin;
}
);
}
};
No other release has this exact content. See every version of this file.