CoreFiles by mySites.guru
Form.php47 lines, 1,043 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
e4f0349e648226429dbc616764491e47
sha1
81dd6b13f580b2c2656b6ce80bf860865c0deeaa
sha256
81f4071e6cd86cfb5dc359018a7e641d6acd389b073bace74ee3180acefba99b
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2019 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Service\Provider;

\defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Form\FormFactory;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;

/**
 * Service provider for the form dependency
 *
 * @since  4.0
 */
class Form implements ServiceProviderInterface
{
	/**
	 * Registers the service provider with a DI container.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  void
	 *
	 * @since   4.0
	 */
	public function register(Container $container)
	{
		$container->alias('form.factory', FormFactoryInterface::class)
			->alias(FormFactory::class, FormFactoryInterface::class)
			->share(
				FormFactoryInterface::class,
				function (Container $container)
				{
					return new FormFactory;
				},
				true
			);
	}
}

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