CoreFiles by mySites.guru
Module.php62 lines, 1,668 bytes, from Joomla_4.0.0-alpha5-Alpha-Full_Package.zip
Raw History Compare with 4.0.0-alpha3
md5
c6bf0cc8dbfea988173a9aa742547a64
sha1
4a052287e395c0e47c121cc3c4dc1b4524019751
sha256
de231a06cf2ba8289d6211987fd025e862709e77d4ece8091c50912d2fbc8c35
<?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\Extension;

defined('JPATH_PLATFORM') or die;

use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\Dispatcher\DispatcherInterface;
use Joomla\CMS\Dispatcher\ModuleDispatcherFactoryInterface;
use Joomla\CMS\Dispatcher\ModuleDispatcherInterface;
use Joomla\Input\Input;

/**
 * Access to module specific services.
 *
 * @since  4.0.0
 */
class Module implements ModuleInterface
{
	/**
	 * The dispatcher factory.
	 *
	 * @var ModuleDispatcherFactoryInterface
	 *
	 * @since  4.0.0
	 */
	private $dispatcherFactory;

	/**
	 * Module constructor.
	 *
	 * @param   ModuleDispatcherFactoryInterface  $dispatcherFactory  The dispatcher factory
	 *
	 * @since   4.0.0
	 */
	public function __construct(ModuleDispatcherFactoryInterface $dispatcherFactory)
	{
		$this->dispatcherFactory = $dispatcherFactory;
	}

	/**
	 * Returns the dispatcher for the given application, module and input.
	 *
	 * @param   \stdClass                $module       The module
	 * @param   CMSApplicationInterface  $application  The application
	 * @param   Input                    $input        The input object, defaults to the one in the application
	 *
	 * @return  DispatcherInterface
	 *
	 * @since   4.0.0
	 */
	public function getDispatcher(\stdClass $module, CMSApplicationInterface $application, Input $input = null): DispatcherInterface
	{
		return $this->dispatcherFactory->createDispatcher($module, $application, $input);
	}
}

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.