CoreFiles by mySites.guru
Menu.php47 lines, 1,057 bytes, from Joomla_4.0.0-alpha12-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha11
md5
e6bb8d4deb5877b7caabee9034ec53f5
sha1
f2d0348e02f898cf8604c210373d9e87bc0934a3
sha256
9159999323b0b6b7c35de3ef32544218b22004079e58bb6cb62427bc4fb1c2e7
<?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\Menu\MenuFactory;
use Joomla\CMS\Menu\MenuFactoryInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;

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

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