CoreFiles by mySites.guru
provider.php42 lines, 1,057 bytes, from Joomla_4.2.0-beta2-Beta-Full_Package.zip
Raw History Compare with 4.2.0-beta1
md5
f3ef88942753bd88012e168a83da0bf8
sha1
95792aa7f569a97a81a77f4d7715a2518c01a5f7
sha256
c25175ab4d0dbeec827f0e3f9e1ccd3c098d4ea51bf75b651d7ad68bde02a0bc
<?php
/**
 * @package     Joomla.Plugin
 * @subpackage  Multifactorauth.fixed
 *
 * @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\Fixed\Extension\Fixed;

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', 'fixed');
				$subject = $container->get(DispatcherInterface::class);

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

The same content is in 2 releases, Joomla 4.2.0-beta1 to 4.2.0-beta2. See them all, or every version of this file.