CoreFiles by mySites.guru
provider.php48 lines, 1,362 bytes, from Joomla_4.3.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.2.0-alpha3
md5
9ba67d6284ea5f9609c779871ae7e32b
sha1
52ecaddaa1219cd96e86daa5708f002c983ecb52
sha256
8ed171dd55c8473de9dccd865f3af5c33b92c478e772e24f86482305de86e051
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Quickicon.phpversioncheck
 *
 * @copyright   (C) 2022 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\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Quickicon\PhpVersionCheck\Extension\PhpVersionCheck;

return new class implements ServiceProviderInterface
{
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   4.3.0
     */
    public function register(Container $container)
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $dispatcher = $container->get(DispatcherInterface::class);
                $plugin     = new PhpVersionCheck(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('quickicon', 'phpversioncheck')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 3 releases, Joomla 4.3.0-alpha1 to 4.3.0-alpha3. See them all, or every version of this file.