CoreFiles by mySites.guru
CacheController.php47 lines, 1,157 bytes, from Joomla_4.0.0-beta5-Beta-Full_Package.zip
Raw History Compare with 4.0.0-beta4
md5
b7e3e1d5834e8a5bc3cf59f4e93eaddd
sha1
727dcdfb536b9ac36102085c1902e5a0ba8f81ee
sha256
6162df435f550320e0c8297b86dc75a2e18db523677464b663a33d96184f1e83
<?php
/**
 * Joomla! Content Management System
 *
 * @copyright  Copyright (C) 2005 - 2020 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 5 releases, Joomla 4.0.0-beta to 4.0.0-beta5. See them all, or every version of this file.