CoreFiles by mySites.guru
Menu.php47 lines, 1,056 bytes, from Joomla_4.0.0-alpha6-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha5
md5
fa5ab50d4264109f61c6a1b07a5f2973
sha1
0d7380a2fa0955d2f5a43d34a6cbd9d8e4132ae7
sha256
4879467d533a367a473065d11de95bfbcdf0b7606efafae49e5df4e23b2fc447
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2018 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
			);
	}
}

The same content is in 3 releases, Joomla 4.0.0-alpha3 to 4.0.0-alpha6. See them all, or every version of this file.