CoreFiles by mySites.guru
provider.php47 lines, 1,327 bytes, from Joomla_5.0.0-alpha1-Alpha-Full_Package.zip
Raw History Compare with 4.4.0-alpha4
md5
2eb72d9f72dd11fbae5321f0296c4cda
sha1
39aefc7865163cf858cf0a2272617d9149a8243d
sha256
f48cd2e606f32cb6d9ca7af5ff907d51c317b53236736828a6de1c27f0285502
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Webservices.menus
 *
 * @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\Event\DispatcherInterface;
use Joomla\Plugin\WebServices\Menus\Extension\Menus;

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): void
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $dispatcher = $container->get(DispatcherInterface::class);
                $plugin     = new Menus(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('webservices', 'menus')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

No other release has this exact content. See every version of this file.