CoreFiles by mySites.guru
provider.php44 lines, 1,208 bytes, from Joomla_6.0.4-Stable-Full_Package.zip
Raw History Compare with 6.0.3
md5
a290a26571d41bd72462e12caa78f3b2
sha1
a9a1606123ba320ca3e49d12d487982845298f6d
sha256
514b4919f818ee5b3f86a3dfcf4ecb38a7ddc4f5145a230c1d2a93cd9a585f2e
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  System.debug
 *
 * @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\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\System\Debug\Extension\Debug;

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) {
                return new Debug(
                    (array) PluginHelper::getPlugin('system', 'debug'),
                    Factory::getApplication(),
                    $container->get(DatabaseInterface::class)
                );
            }
        );
    }
};

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.