CoreFiles by mySites.guru
provider.php47 lines, 1,334 bytes, from Joomla_4.4.7-Stable-Full_Package.zip
Raw History Compare with 4.4.6
md5
6f40ddf05cbc2ffdafe08cefea50b9e3
sha1
59dd7e9221fba748daa023c1cfff2060cdaf775a
sha256
cbeda89a4f37dad7925f7bf674d952d1034f532c3e9298caedeb3e6188873faa
<?php

/**
 * @package     Joomla.Plugin
 * @subpackage  Content.emailcloak
 *
 * @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\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\DispatcherInterface;
use Joomla\Plugin\Content\EmailCloak\Extension\EmailCloak;

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,
            function (Container $container) {
                $dispatcher = $container->get(DispatcherInterface::class);
                $plugin     = new EmailCloak(
                    $dispatcher,
                    (array) PluginHelper::getPlugin('content', 'emailcloak')
                );
                $plugin->setApplication(Factory::getApplication());

                return $plugin;
            }
        );
    }
};

The same content is in 54 releases, Joomla 4.3.0-beta1 to 5.0.0-alpha1. See them all, or every version of this file.