CoreFiles by mySites.guru
CacheController.php45 lines, 1,243 bytes, from Joomla_4.2.1-rc2-Release_Candidate-Full_Package.zip
Raw History Compare with 4.2.1-rc1
md5
a785c7e869994ab4a9d9789a8994cc94
sha1
98555378c8e1ccaea22c085a584c7a55533f0e6a
sha256
921a13cb0ca56c4b4ead56bd53fcac47861b186a555ec206e176a7dd002e8c8e
<?php

/**
 * Joomla! Content Management System
 *
 * @copyright  (C) 2018 Open Source Matters, Inc. <https://www.joomla.org>
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

namespace Joomla\CMS\Service\Provider;

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.0
 */
class CacheController 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('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.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.