public \Joomla\CMS\Dispatcher\DispatcherInterface
createDispatcher
(\stdClass $module, \Joomla\CMS\Application\CMSApplicationInterface $application, \Joomla\Input\Input $input = null)
/**
* Creates a dispatcher.
*
* @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 createDispatcher(\stdClass $module, CMSApplicationInterface $application, Input $input = null) : DispatcherInterface
{
$name = 'Site';
if ($application->isClient('administrator')) {
$name = 'Administrator';
}
$className = '\\' . trim($this->namespace, '\\') . '\\' . $name . '\\Dispatcher\\Dispatcher';
if (!class_exists($className)) {
$className = ModuleDispatcher::class;
}
return new $className($module, $application, $input ?: $application->input);
}