CoreFiles by mySites.guru
Dispatcher.php47 lines, 1,089 bytes, from Joomla_4.0.0-alpha2-Alpha-Full_Package.zip
Raw History Compare with 3.10.0-alpha9
md5
f34c6ffdf653b3a989afbcc001d5fa8f
sha1
b7dcbcf47108b6075e2642c951173416b0659c04
sha256
65eba93536222f59b2446c106172814cd9447861c1306ae5833a486ae9384a4c
<?php
/**
 * @package     Joomla.Libraries
 * @subpackage  Service
 *
 * @copyright   Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
 * @license     GNU General Public License version 2 or later; see LICENSE
 */

namespace Joomla\CMS\Service\Provider;

defined('JPATH_PLATFORM') or die;

use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use Joomla\Event\Dispatcher as EventDispatcher;

/**
 * Service provider for the application's dispatcher dependency
 *
 * @since  4.0
 */
class Dispatcher 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('dispatcher', 'Joomla\Event\DispatcherInterface')
			->alias('Joomla\Event\Dispatcher', 'Joomla\Event\DispatcherInterface')
			->share(
				'Joomla\Event\DispatcherInterface',
				function (Container $container)
				{
					return new EventDispatcher;
				},
				true
			);
	}
}

No other release has this exact content. See every version of this file.