CoreFiles by mySites.guru
provider.php44 lines, 1,205 bytes, from Joomla_6.1.4-Stable-Full_Package.zip
Raw History Compare with 6.1.3
md5
de1961dccae1b238ed54dcd1903a62f1
sha1
dad1933df1ef3126279a173b073fc364e4482d32
sha256
d115fd7518ffc87af92ab2ea0dc1b796485ed12342d78e570392b6418b7c25cf
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Fields.integer
 *
 * @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\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Plugin\Fields\Integer\Extension\Integer;

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,
            $container->lazy(Integer::class, function (Container $container) {
                $plugin     = new Integer(
                    (array) PluginHelper::getPlugin('fields', 'integer')
                );
                $plugin->setApplication(Factory::getApplication());

                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.