CoreFiles by mySites.guru
provider.php44 lines, 1,226 bytes, from Joomla_6.2.0-Stable-Full_Package.zip
Raw History Compare with 6.1.4
md5
58de471c2c848a98c92fa47440f871c2
sha1
d1e124d2172805bfbdb4e8588592a2b21aed4a86
sha256
5c52ad71a0308205ce0591e8a51da02f7ac511f0fdf37d313f3cd0c89b45b632
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Webservices.banners
 *
 * @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\WebServices\Banners\Extension\Banners;

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

                return $plugin;
            })
        );
    }
};

The same content is in 30 releases, Joomla 6.1.0-beta1 to 6.3.0-alpha1. See them all, or every version of this file.