CoreFiles by mySites.guru
provider.php42 lines, 1,065 bytes, from Joomla_6.0.4-Stable-Full_Package.zip
Raw History Compare with 6.0.3
md5
d3396b98d550e7a5542297dd3c362892
sha1
5662cb4ea866ae8fa7c99b698835d283e7d9d645
sha256
85c34fae8873aefe902b951835f5d2a1983a6707c24aa8b5a87c8b85afe655fd
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  System.log
 *
 * @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\Plugin\System\Log\Extension\Log;

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 Log(
                    (array) PluginHelper::getPlugin('system', 'log')
                );

                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.