CoreFiles by mySites.guru
provider.php46 lines, 1,311 bytes, from Joomla_5.0.3-Stable-Full_Package.zip
Raw History Compare with 5.0.2
md5
c010cf3249805fbb3158d55e81b3911b
sha1
e5afc68d53ca157d28a3baec335aabffecedf0a9
sha256
8f786be0683892ca65a8bfa253c16c3ebc556c9e2e3c23951545beda6c671711
<?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\Event\DispatcherInterface;
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(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('system', 'debug'),
                    Factory::getApplication(),
                    $container->get(DatabaseInterface::class)
                );
            }
        );
    }
};

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