CoreFiles by mySites.guru
provider.php45 lines, 1,318 bytes, from Joomla_5.2.0-Stable-Full_Package.zip
Raw History Compare with 5.1.4
md5
57f6f0f8f904fe7ffba9df41efc9b23c
sha1
cab08ce0674af443483f3ba8952c6740a73f15c6
sha256
9b8a41ba8dfb1e512b4da3acd8f2c089ae621320465442ed74cc18d81c286eff
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Task.Globalcheckin
 *
 * @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\Database\DatabaseInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Task\Globalcheckin\Extension\Globalcheckin;

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) {
                $checkin = new Globalcheckin(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('task', 'globalcheckin')
                );
                $checkin->setDatabase($container->get(DatabaseInterface::class));

                return $checkin;
            }
        );
    }
};

The same content is in 61 releases, Joomla 5.1.0-beta2 to 6.0.0-beta1. See them all, or every version of this file.