CoreFiles by mySites.guru
provider.php44 lines, 1,196 bytes, from Joomla_6.1.2-Stable-Full_Package.zip
Raw History Compare with 6.1.1
md5
0b505524da4cadc36bffa134387e9dc7
sha1
d1e819076d093bf6375a72f9ff238c68c3c048f8
sha256
0b3f1fe6bdb5cfe1a08287e71f5d91dd6d562379134e4f8818ea59c6b9a11d89
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Content.vote
 *
 * @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\Content\Vote\Extension\Vote;

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(Vote::class, function (Container $container) {
                $plugin     = new Vote(
                    (array) PluginHelper::getPlugin('content', 'vote')
                );
                $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.