CoreFiles by mySites.guru
CacheController.php47 lines, 1,156 bytes, from Joomla_4.0.0-alpha7-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha6
md5
64619e4b17e28c7ac12f8e4dfecb26d4
sha1
3e603236f6ed709b3d130f54fbcbed3de9d976f9
sha256
f92b8ffcf0bf7b396888fa2cf44689332683bd4963d1ac2266dda67a26a93f79
<?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\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-alpha7 to 4.0.0-alpha11. See them all, or every version of this file.