CoreFiles by mySites.guru
ApiRouter.php45 lines, 1,032 bytes, from Joomla_4.0.0-alpha8-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha7
md5
5ffbf53ffc5552aba8a2acb93a0cad83
sha1
bea1ea5af24c153abf5b9c75b6eb20ae979412a4
sha256
a0ac039e8b84be42e0f6876f461b0fbe49ab450277c5b20ea0da144f18c9d9ca
<?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\SiteApplication;
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(SiteApplication::class));
			},
			true
		);
	}
}

The same content is in 4 releases, Joomla 4.0.0-alpha7 to 4.0.0-alpha10. See them all, or every version of this file.