CoreFiles by mySites.guru
provider.php42 lines, 1,113 bytes, from Joomla_6.1.2-Stable-Full_Package.zip
Raw History Compare with 6.1.1
md5
342c051ee34f61172fa0a684e100d266
sha1
1b95553abc2ca7e7475f945e212d3c44a591b4bb
sha256
106435bcd428d74742e1e4aed297e5fb1d5e9f921455d9e73b98ac0a3c72bb81
<?php

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

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,
            $container->lazy(Skipto::class, function (Container $container) {
                $plugin     = new Skipto(
                    (array) PluginHelper::getPlugin('system', 'skipto')
                );

                return $plugin;
            })
        );
    }
};

The same content is in 28 releases, Joomla 6.1.0-beta1 to 6.2.1-rc1. See them all, or every version of this file.