CoreFiles by mySites.guru
provider.php44 lines, 1,196 bytes, from Joomla_5.2.4-Stable-Full_Package.zip
Raw History Compare with 5.2.3
md5
2d2dfb4a5cbb5d1d2ca83ee6dbb8f20a
sha1
6ebe593455573dc48d9d484f6c81dff5b17d25e2
sha256
a4cdc7321dddc6fdac4e69c22f220321758d8acf662a3373d1a07d245b1bc3d1
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Behaviour.taggable
 *
 * @copyright   (C) 2022 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\Event\DispatcherInterface;
use Joomla\Plugin\Behaviour\Taggable\Extension\Taggable;

return new class () implements ServiceProviderInterface {
    /**
     * Registers the service provider with a DI container.
     *
     * @param   Container  $container  The DI container.
     *
     * @return  void
     *
     * @since   4.2.0
     */
    public function register(Container $container)
    {
        $container->set(
            PluginInterface::class,
            function (Container $container) {
                $plugin     = new Taggable(
                    $container->get(DispatcherInterface::class),
                    (array) PluginHelper::getPlugin('behaviour', 'taggable')
                );

                return $plugin;
            }
        );
    }
};

The same content is in 77 releases, Joomla 5.0.0-rc to 6.0.0-beta1. See them all, or every version of this file.