CoreFiles by mySites.guru
provider.php48 lines, 1,423 bytes, from Joomla_5.3.4-Stable-Full_Package.zip
Raw History Compare with 5.3.3
md5
6d6a9f95094581d5b8c39b4905fe9ef0
sha1
cc390157735e670f366e07bb8bf5d0a56ab9a56a
sha256
0baad4a82f51356e8bb57e55766d5f78655d4fd3521a4e15af42637c6839a972
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Task.deletelogs
 *
 * @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\Task\DeleteActionLogs\Extension\DeleteActionLogs;

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 = new DeleteActionLogs(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('task', 'deleteactionlogs')
                );
                $plugin->setApplication(Factory::getApplication());
                $plugin->setDatabase($container->get(DatabaseInterface::class));

                return $plugin;
            }
        );
    }
};

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.