- md5
- bbe897cc931d76250684533484ee4446
- sha1
- 98b0db23ba6a93da7692dcd99d5f3ce7ff59089b
- sha256
- 4d6713d506081cb8ec9d7c3f23d0a7cfab132c6c9ce68ba3ff87ec04aec0bfdd
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
<?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\Extension;
\defined('JPATH_PLATFORM') or die;
use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\Dispatcher\DispatcherInterface;
use Joomla\CMS\Dispatcher\ModuleDispatcherFactoryInterface;
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-beta6 to 4.0.0-beta7. See them all, or every version of this file.