CoreFiles by mySites.guru
provider.php42 lines, 1,057 bytes, from Joomla_4.2.0-beta1-Beta-Full_Package.zip
Raw History Compare with 4.1.0-beta3
md5
514ff1261a1ecc35614ea2d319e13bea
sha1
fc0475fb9b537936fe145d44f45e7723135e48b0
sha256
d45973b61032b7c231abc2c197fe835870155966748cdb8562a9316df25a9aa1
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Multifactorauth.email
 *
 * @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') || 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\Multifactorauth\Email\Extension\Email;

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) {
				$config  = (array) PluginHelper::getPlugin('multifactorauth', 'email');
				$subject = $container->get(DispatcherInterface::class);

				return new Email($subject, $config);
			}
		);
	}
};

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