CoreFiles by mySites.guru
CacheController.php47 lines, 1,156 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
3316f9ccfbb3477053bf07ac61edb96e
sha1
4638b6bc4bf7608801bf463be481faa3768a0fde
sha256
16b4d494bc3d41684146c36d59a7966c2c8ffa2100d95c923bfe4349793e7300
<?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\Cache\CacheControllerFactory;
use Joomla\CMS\Cache\CacheControllerFactoryInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;

/**
 * Service provider for the cache controller dependency
 *
 * @since  4.0
 */
class CacheController 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('cache.controller.factory', CacheControllerFactoryInterface::class)
			->alias(CacheControllerFactory::class, CacheControllerFactoryInterface::class)
			->share(
				CacheControllerFactoryInterface::class,
				function (Container $container)
				{
					return new CacheControllerFactory;
				},
				true
			);
	}
}

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