CoreFiles by mySites.guru
ApiRouter.php45 lines, 1,037 bytes, from Joomla_4.0.0-alpha11-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha10
md5
9f9f30cdf83c86645ca84f1be4290e0f
sha1
afd6de86f70c49c4276ad73fb44c6e3e7677dd0c
sha256
e1d2a5e195d442632cfc9fca28ffc11969d443bc7dc26a055a58b9012f5f0153
<?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\Application\ApiApplication;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;

/**
 * Service provider for the application's API router dependency
 *
 * @since  4.0.0
 */
class ApiRouter implements ServiceProviderInterface
{
	/**
	 * Registers the service provider with a DI container.
	 *
	 * @param   Container  $container  The DI container.
	 *
	 * @return  void
	 *
	 * @since   4.0.0
	 */
	public function register(Container $container)
	{
		$container->alias('ApiRouter', 'Joomla\CMS\Router\ApiRouter')
			->share(
				'Joomla\CMS\Router\ApiRouter',
				function (Container $container)
				{
					return new \Joomla\CMS\Router\ApiRouter($container->get(ApiApplication::class));
				},
				true
			);
	}
}

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