CoreFiles by mySites.guru
Document.php47 lines, 1,049 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
1e57908ac4637f5daea69017e7e81071
sha1
fef96cf3862a2c2b7a0a8da06ac16bc4be3b2cb9
sha256
84d3afa27771f59e6898ac3ab91f2dbcf8855a23b8ad36feb764f3f410678e65
<?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\Document\Factory;
use Joomla\CMS\Document\FactoryInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;

/**
 * Service provider for the application's document dependency
 *
 * @since  4.0
 */
class Document 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('document.factory', FactoryInterface::class)
			->alias(Factory::class, FactoryInterface::class)
			->share(
				FactoryInterface::class,
				function (Container $container)
				{
					return new Factory;
				},
				true
			);
	}
}

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