diff --git a/administrator/components/com_admin/services/provider.php b/administrator/components/com_admin/services/provider.php
index e0ce521d93765..146bb51ed275e 100644
--- a/administrator/components/com_admin/services/provider.php
+++ b/administrator/components/com_admin/services/provider.php
@@ -9,9 +9,9 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -38,13 +38,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Admin'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Admin'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Admin'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new AdminComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new AdminComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
diff --git a/administrator/components/com_associations/services/provider.php b/administrator/components/com_associations/services/provider.php
index ffeb36bbacd8c..409a32fb0bc51 100644
--- a/administrator/components/com_associations/services/provider.php
+++ b/administrator/components/com_associations/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,13 +37,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Associations'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Associations'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Associations'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_banners/services/provider.php b/administrator/components/com_banners/services/provider.php
index ec091c0ea2401..94fddf214495b 100644
--- a/administrator/components/com_banners/services/provider.php
+++ b/administrator/components/com_banners/services/provider.php
@@ -10,10 +10,10 @@
defined('_JEXEC') or die;
use Joomla\CMS\Categories\CategoryFactoryInterface;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\Service\Provider\CategoryFactory;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -41,13 +41,13 @@ public function register(Container $container)
{
$container->registerServiceProvider(new CategoryFactory('\\Joomla\\Component\\Banners'));
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Banners'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Banners'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Banners'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new BannersComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new BannersComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_cache/services/provider.php b/administrator/components/com_cache/services/provider.php
index c084d176c8bc9..b3119e9e30f68 100644
--- a/administrator/components/com_cache/services/provider.php
+++ b/administrator/components/com_cache/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,13 +37,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Cache'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Cache'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Cache'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_categories/services/provider.php b/administrator/components/com_categories/services/provider.php
index 77ddf87573669..031216a780f8d 100644
--- a/administrator/components/com_categories/services/provider.php
+++ b/administrator/components/com_categories/services/provider.php
@@ -9,9 +9,9 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -38,13 +38,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Categories'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Categories'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Categories'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new CategoriesComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new CategoriesComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
diff --git a/administrator/components/com_checkin/services/provider.php b/administrator/components/com_checkin/services/provider.php
index 371d200d35f86..0e343bd62fe4a 100644
--- a/administrator/components/com_checkin/services/provider.php
+++ b/administrator/components/com_checkin/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,13 +37,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Checkin'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Checkin'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Checkin'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_config/services/provider.php b/administrator/components/com_config/services/provider.php
index 231255a78f95c..6a8f00da679b7 100644
--- a/administrator/components/com_config/services/provider.php
+++ b/administrator/components/com_config/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,13 +37,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Config'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Config'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Config'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_content/services/provider.php b/administrator/components/com_content/services/provider.php
index 9266e4d7f4ee3..bb41fd933a866 100644
--- a/administrator/components/com_content/services/provider.php
+++ b/administrator/components/com_content/services/provider.php
@@ -12,10 +12,10 @@
use Joomla\CMS\Association\AssociationExtensionInterface;
use Joomla\CMS\Categories\CategoryFactoryInterface;
use Joomla\CMS\Component\Router\RouterFactoryInterface;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\Service\Provider\CategoryFactory;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\Extension\Service\Provider\RouterFactory;
use Joomla\CMS\HTML\Registry;
@@ -47,14 +47,14 @@ public function register(Container $container)
$container->registerServiceProvider(new CategoryFactory('\\Joomla\\Component\\Content'));
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Content'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Content'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Content'));
$container->registerServiceProvider(new RouterFactory('\\Joomla\\Component\\Content'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new ContentComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new ContentComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_contenthistory/services/provider.php b/administrator/components/com_contenthistory/services/provider.php
index 12202354091e9..d35eb89987ba4 100644
--- a/administrator/components/com_contenthistory/services/provider.php
+++ b/administrator/components/com_contenthistory/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,13 +37,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Contenthistory'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Contenthistory'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Contenthistory'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_cpanel/services/provider.php b/administrator/components/com_cpanel/services/provider.php
index c45e2160dc7ee..bb50265f7d55b 100644
--- a/administrator/components/com_cpanel/services/provider.php
+++ b/administrator/components/com_cpanel/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,13 +37,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Cpanel'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Cpanel'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Cpanel'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_csp/services/provider.php b/administrator/components/com_csp/services/provider.php
index 6f7179907a5d5..d15a7689d3f5c 100644
--- a/administrator/components/com_csp/services/provider.php
+++ b/administrator/components/com_csp/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,12 +37,12 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Csp'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Csp'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Csp'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
return $component;
diff --git a/administrator/components/com_fields/services/provider.php b/administrator/components/com_fields/services/provider.php
index f5bac66933c18..79832ed2134f1 100644
--- a/administrator/components/com_fields/services/provider.php
+++ b/administrator/components/com_fields/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,13 +37,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Fields'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Fields'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Fields'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_finder/services/provider.php b/administrator/components/com_finder/services/provider.php
index 6d251433b20b6..d30c6c81c3e27 100644
--- a/administrator/components/com_finder/services/provider.php
+++ b/administrator/components/com_finder/services/provider.php
@@ -10,9 +10,9 @@
defined('_JEXEC') or die;
use Joomla\CMS\Component\Router\RouterFactoryInterface;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\Extension\Service\Provider\RouterFactory;
use Joomla\CMS\HTML\Registry;
@@ -40,14 +40,14 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Finder'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Finder'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Finder'));
$container->registerServiceProvider(new RouterFactory('\\Joomla\\Component\\Finder'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new FinderComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new FinderComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRouterFactory($container->get(RouterFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
diff --git a/administrator/components/com_installer/services/provider.php b/administrator/components/com_installer/services/provider.php
index f7846b66458b1..e566e50fe992f 100644
--- a/administrator/components/com_installer/services/provider.php
+++ b/administrator/components/com_installer/services/provider.php
@@ -9,9 +9,9 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -38,13 +38,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Installer'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Installer'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Installer'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new InstallerComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new InstallerComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
diff --git a/administrator/components/com_joomlaupdate/services/provider.php b/administrator/components/com_joomlaupdate/services/provider.php
index f6dad31cf419e..6eb75115d4557 100644
--- a/administrator/components/com_joomlaupdate/services/provider.php
+++ b/administrator/components/com_joomlaupdate/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,13 +37,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Joomlaupdate'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Joomlaupdate'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Joomlaupdate'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_languages/services/provider.php b/administrator/components/com_languages/services/provider.php
index c018126f80312..247b98cc38bb3 100644
--- a/administrator/components/com_languages/services/provider.php
+++ b/administrator/components/com_languages/services/provider.php
@@ -9,9 +9,9 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -38,13 +38,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Languages'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Languages'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Languages'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new LanguagesComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new LanguagesComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
diff --git a/administrator/components/com_login/services/provider.php b/administrator/components/com_login/services/provider.php
index 548ae07ecb74d..b8fcbb563653f 100644
--- a/administrator/components/com_login/services/provider.php
+++ b/administrator/components/com_login/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,12 +37,12 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Login'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Login'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Login'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
return $component;
diff --git a/administrator/components/com_mailto/services/provider.php b/administrator/components/com_mailto/services/provider.php
index ecb1a20167599..c82cbe46c794c 100644
--- a/administrator/components/com_mailto/services/provider.php
+++ b/administrator/components/com_mailto/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,12 +37,12 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Mailto'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Mailto'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Mailto'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
return $component;
diff --git a/administrator/components/com_media/services/provider.php b/administrator/components/com_media/services/provider.php
index befb4786278c4..6e91028fed9d6 100644
--- a/administrator/components/com_media/services/provider.php
+++ b/administrator/components/com_media/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,13 +37,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Media'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Media'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Media'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_menus/services/provider.php b/administrator/components/com_menus/services/provider.php
index 81df4b866985e..839fea0753c34 100644
--- a/administrator/components/com_menus/services/provider.php
+++ b/administrator/components/com_menus/services/provider.php
@@ -10,9 +10,9 @@
defined('_JEXEC') or die;
use Joomla\CMS\Association\AssociationExtensionInterface;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -42,13 +42,13 @@ public function register(Container $container)
$container->set(AssociationExtensionInterface::class, new AssociationsHelper);
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Menus'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Menus'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Menus'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MenusComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MenusComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
diff --git a/administrator/components/com_messages/services/provider.php b/administrator/components/com_messages/services/provider.php
index c8697d57fb941..8860ba7416250 100644
--- a/administrator/components/com_messages/services/provider.php
+++ b/administrator/components/com_messages/services/provider.php
@@ -9,9 +9,9 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -38,13 +38,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Messages'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Messages'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Messages'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MessagesComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MessagesComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
diff --git a/administrator/components/com_modules/services/provider.php b/administrator/components/com_modules/services/provider.php
index a1dee3e0c8b26..571a8bfe5692c 100644
--- a/administrator/components/com_modules/services/provider.php
+++ b/administrator/components/com_modules/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -39,13 +39,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Modules'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Modules'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Modules'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new ModulesComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new ModulesComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
diff --git a/administrator/components/com_plugins/services/provider.php b/administrator/components/com_plugins/services/provider.php
index f31c19789765d..1f9f88c1b9480 100644
--- a/administrator/components/com_plugins/services/provider.php
+++ b/administrator/components/com_plugins/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,12 +37,12 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Plugins'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Plugins'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Plugins'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
return $component;
diff --git a/administrator/components/com_postinstall/services/provider.php b/administrator/components/com_postinstall/services/provider.php
index b2e332f672898..adcd5754833fc 100644
--- a/administrator/components/com_postinstall/services/provider.php
+++ b/administrator/components/com_postinstall/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,12 +37,12 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Postinstall'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Postinstall'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Postinstall'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
return $component;
diff --git a/administrator/components/com_redirect/services/provider.php b/administrator/components/com_redirect/services/provider.php
index 72a2b5c786f29..93d88b4454aa7 100644
--- a/administrator/components/com_redirect/services/provider.php
+++ b/administrator/components/com_redirect/services/provider.php
@@ -9,9 +9,9 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -38,13 +38,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Redirect'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Redirect'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Redirect'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new RedirectComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new RedirectComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
diff --git a/administrator/components/com_search/services/provider.php b/administrator/components/com_search/services/provider.php
index 78f9cefb94170..2622bd717ff41 100644
--- a/administrator/components/com_search/services/provider.php
+++ b/administrator/components/com_search/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,12 +37,12 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Search'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Search'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Search'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
return $component;
diff --git a/administrator/components/com_tags/services/provider.php b/administrator/components/com_tags/services/provider.php
index 3b695086d673b..29f0cc0934521 100644
--- a/administrator/components/com_tags/services/provider.php
+++ b/administrator/components/com_tags/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,12 +37,12 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Tags'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Tags'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Tags'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
return $component;
diff --git a/administrator/components/com_templates/services/provider.php b/administrator/components/com_templates/services/provider.php
index 80f7bc73cdb42..abb8557fe407d 100644
--- a/administrator/components/com_templates/services/provider.php
+++ b/administrator/components/com_templates/services/provider.php
@@ -9,9 +9,9 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\HTML\Registry;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -38,13 +38,13 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Templates'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Templates'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Templates'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new TemplatesComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new TemplatesComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRegistry($container->get(Registry::class));
diff --git a/administrator/components/com_users/services/provider.php b/administrator/components/com_users/services/provider.php
index d4c5a0fb8e6ea..3c19e058156f4 100644
--- a/administrator/components/com_users/services/provider.php
+++ b/administrator/components/com_users/services/provider.php
@@ -10,9 +10,9 @@
defined('_JEXEC') or die;
use Joomla\CMS\Component\Router\RouterFactoryInterface;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\Extension\Service\Provider\RouterFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
@@ -39,14 +39,14 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Users'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Users'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Users'));
$container->registerServiceProvider(new RouterFactory('\\Joomla\\Component\\Users'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new UsersComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new UsersComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
$component->setRouterFactory($container->get(RouterFactoryInterface::class));
diff --git a/administrator/components/com_workflow/services/provider.php b/administrator/components/com_workflow/services/provider.php
index 14287b8f52564..3a99af006d310 100644
--- a/administrator/components/com_workflow/services/provider.php
+++ b/administrator/components/com_workflow/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,12 +37,12 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Workflow'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Workflow'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Workflow'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
return $component;
diff --git a/administrator/components/com_wrapper/services/provider.php b/administrator/components/com_wrapper/services/provider.php
index f9b9d2bb07f1b..620e8acb9a85c 100644
--- a/administrator/components/com_wrapper/services/provider.php
+++ b/administrator/components/com_wrapper/services/provider.php
@@ -9,10 +9,10 @@
defined('_JEXEC') or die;
-use Joomla\CMS\Dispatcher\DispatcherFactoryInterface;
+use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
use Joomla\CMS\Extension\ComponentInterface;
use Joomla\CMS\Extension\MVCComponent;
-use Joomla\CMS\Extension\Service\Provider\DispatcherFactory;
+use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
use Joomla\CMS\Extension\Service\Provider\MVCFactoryFactory;
use Joomla\CMS\MVC\Factory\MVCFactoryFactoryInterface;
use Joomla\DI\Container;
@@ -37,12 +37,12 @@
public function register(Container $container)
{
$container->registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Wrapper'));
- $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Wrapper'));
+ $container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\Wrapper'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
- $component = new MVCComponent($container->get(DispatcherFactoryInterface::class));
+ $component = new MVCComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class));
return $component;
diff --git a/administrator/modules/mod_quickicon/Dispatcher/Dispatcher.php b/administrator/modules/mod_quickicon/Dispatcher/Dispatcher.php
new file mode 100644
index 0000000000000..1ecaa52c0c198
--- /dev/null
+++ b/administrator/modules/mod_quickicon/Dispatcher/Dispatcher.php
@@ -0,0 +1,42 @@
+getApplication());
+
+ return $data;
+ }
+}
diff --git a/administrator/modules/mod_quickicon/Helper/QuickIconHelper.php b/administrator/modules/mod_quickicon/Helper/QuickIconHelper.php
index 5613d534aeeee..aedafb0de58cd 100644
--- a/administrator/modules/mod_quickicon/Helper/QuickIconHelper.php
+++ b/administrator/modules/mod_quickicon/Helper/QuickIconHelper.php
@@ -11,11 +11,13 @@
defined('_JEXEC') or die;
+use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Module\Quickicon\Administrator\Event\QuickIconsEvent;
+use Joomla\Registry\Registry;
/**
* Helper for mod_quickicon
@@ -38,14 +40,20 @@ abstract class QuickIconHelper
* This method returns the array by reference so it can be
* used to add custom buttons or remove default ones.
*
- * @param \JObject $params The module parameters.
+ * @param Registry $params The module parameters
+ * @param CMSApplication $application The application
*
* @return array An array of buttons
*
* @since 1.6
*/
- public static function &getButtons($params)
+ public static function &getButtons(Registry $params, CMSApplication $application = null)
{
+ if ($application == null)
+ {
+ $application = Factory::getApplication();
+ }
+
$key = (string) $params;
if (!isset(self::$buttons[$key]))
@@ -55,7 +63,7 @@ public static function &getButtons($params)
if ($context === 'mod_quickicon')
{
// Load mod_quickicon language file in case this method is called before rendering the module
- Factory::getLanguage()->load('mod_quickicon');
+ $application->getLanguage()->load('mod_quickicon');
self::$buttons[$key] = array(
array(
@@ -96,7 +104,7 @@ public static function &getButtons($params)
// Include buttons defined by published quickicon plugins
PluginHelper::importPlugin('quickicon');
- $arrays = (array) Factory::getApplication()->triggerEvent(
+ $arrays = (array) $application->triggerEvent(
'onGetIcons',
new QuickIconsEvent('onGetIcons', ['context' => $context])
);
diff --git a/administrator/modules/mod_quickicon/mod_quickicon.php b/administrator/modules/mod_quickicon/mod_quickicon.php
deleted file mode 100644
index afb6b1e2b0254..0000000000000
--- a/administrator/modules/mod_quickicon/mod_quickicon.php
+++ /dev/null
@@ -1,14 +0,0 @@
-get('layout', 'default'));
diff --git a/administrator/modules/mod_quickicon/services/provider.php b/administrator/modules/mod_quickicon/services/provider.php
new file mode 100644
index 0000000000000..b5f6f97c6ff47
--- /dev/null
+++ b/administrator/modules/mod_quickicon/services/provider.php
@@ -0,0 +1,39 @@
+registerServiceProvider(new ModuleDispatcherFactory('\\Joomla\\Module\\Quickicon'));
+
+ $container->registerServiceProvider(new Module);
+ }
+};
diff --git a/build/phpcs/Joomla/ruleset.xml b/build/phpcs/Joomla/ruleset.xml
index 88f130d4c69ae..938b1668b1e6e 100644
--- a/build/phpcs/Joomla/ruleset.xml
+++ b/build/phpcs/Joomla/ruleset.xml
@@ -36,7 +36,7 @@
tests/unit/suites/libraries/legacy/controller/stubs/component2/controller.php
- administrator/components/*/services/provider.php
+ */services/provider.php
RoboFile.php
diff --git a/libraries/src/Dispatcher/AbstractModuleDispatcher.php b/libraries/src/Dispatcher/AbstractModuleDispatcher.php
new file mode 100644
index 0000000000000..230a659b8a212
--- /dev/null
+++ b/libraries/src/Dispatcher/AbstractModuleDispatcher.php
@@ -0,0 +1,123 @@
+module = $module;
+ }
+
+ /**
+ * Runs the dispatcher.
+ *
+ * @return void
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ public function dispatch()
+ {
+ $this->loadLanguage();
+
+ $displayData = $this->getLayoutData();
+
+ // Abort when display data is false
+ if ($displayData === false)
+ {
+ return;
+ }
+
+ // Execute the layout without the module context
+ $loader = static function(array $displayData)
+ {
+ extract($displayData);
+ require ModuleHelper::getLayoutPath($displayData['module']->module, $displayData['params']->get('layout', 'default'));
+ };
+
+ $loader($displayData);
+ }
+
+ /**
+ * Returns the layout data. This function can be overridden by subclasses to add more
+ * attributes for the layout.
+ *
+ * If false is returned, then it means that the dispatch process should be aborted.
+ *
+ * @return array|false
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ protected function getLayoutData()
+ {
+ return [
+ 'module' => $this->module,
+ 'app' => $this->app,
+ 'input' => $this->input,
+ 'params' => new Registry($this->module->params),
+ 'template' => $this->app->getTemplate()
+ ];
+ }
+
+ /**
+ * Load the language.
+ *
+ * @return void
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ protected function loadLanguage()
+ {
+ $language = $this->app->getLanguage();
+
+ $coreLanguageDirectory = JPATH_BASE;
+ $extensionLanguageDirectory = dirname(JPATH_BASE . '/modules/' . $this->module->module);
+
+ $langPaths = $language->getPaths();
+
+ // Only load the module's language file if it hasn't been already
+ if (!$langPaths || (!isset($langPaths[$coreLanguageDirectory]) && !isset($langPaths[$extensionLanguageDirectory])))
+ {
+ // 1.5 or Core then 1.6 3PD
+ $language->load($this->module->module, $coreLanguageDirectory, null, false, true) ||
+ $language->load($this->module->module, $extensionLanguageDirectory, null, false, true);
+ }
+ }
+}
diff --git a/libraries/src/Dispatcher/ComponentDispatcher.php b/libraries/src/Dispatcher/ComponentDispatcher.php
index 8ec63f489c3b2..33ad721753828 100644
--- a/libraries/src/Dispatcher/ComponentDispatcher.php
+++ b/libraries/src/Dispatcher/ComponentDispatcher.php
@@ -19,14 +19,14 @@
use Joomla\Input\Input;
/**
- * Base class for a Joomla ComponentDispatcher
+ * Base class for a Joomla Component Dispatcher
*
* Dispatchers are responsible for checking ACL of a component if appropriate and
* choosing an appropriate controller (and if necessary, a task) and executing it.
*
* @since 4.0.0
*/
-class ComponentDispatcher implements DispatcherInterface
+class ComponentDispatcher extends Dispatcher
{
/**
* The URL option for the component.
@@ -36,28 +36,12 @@ class ComponentDispatcher implements DispatcherInterface
*/
protected $option;
- /**
- * The application instance
- *
- * @var CMSApplication
- * @since 4.0.0
- */
- protected $app;
-
- /**
- * The input instance
- *
- * @var Input
- * @since 4.0.0
- */
- protected $input;
-
/**
* The MVC factory
*
* @var MVCFactoryFactoryInterface
*
- * @since 4.0.0
+ * @since __DEPLOY_VERSION__
*/
private $mvcFactoryFactory;
@@ -72,8 +56,8 @@ class ComponentDispatcher implements DispatcherInterface
*/
public function __construct(CMSApplication $app, Input $input, MVCFactoryFactoryInterface $mvcFactoryFactory)
{
- $this->app = $app;
- $this->input = $input;
+ parent::__construct($app, $input);
+
$this->mvcFactoryFactory = $mvcFactoryFactory;
// If option is not provided, detect it from dispatcher class name, ie ContentDispatcher
@@ -163,18 +147,6 @@ public function dispatch()
$controller->redirect();
}
- /**
- * The application the dispatcher is working with.
- *
- * @return CMSApplication
- *
- * @since 4.0.0
- */
- protected function getApplication(): CMSApplication
- {
- return $this->app;
- }
-
/**
* Get a controller from the component
*
diff --git a/libraries/src/Dispatcher/DispatcherFactory.php b/libraries/src/Dispatcher/ComponentDispatcherFactory.php
similarity index 87%
rename from libraries/src/Dispatcher/DispatcherFactory.php
rename to libraries/src/Dispatcher/ComponentDispatcherFactory.php
index fe5e12e42c9f1..438567bc91e29 100644
--- a/libraries/src/Dispatcher/DispatcherFactory.php
+++ b/libraries/src/Dispatcher/ComponentDispatcherFactory.php
@@ -15,11 +15,11 @@
use Joomla\Input\Input;
/**
- * Namesapce based implementation of the DispatcherFactoryInterface
+ * Namespace based implementation of the ComponentDispatcherFactoryInterface
*
* @since 4.0.0
*/
-class DispatcherFactory implements DispatcherFactoryInterface
+class ComponentDispatcherFactory implements ComponentDispatcherFactoryInterface
{
/**
* The extension namespace
@@ -40,7 +40,7 @@ class DispatcherFactory implements DispatcherFactoryInterface
private $mvcFactoryFactory;
/**
- * DispatcherFactory constructor.
+ * ComponentDispatcherFactory constructor.
*
* @param string $namespace The namespace
* @param MVCFactoryFactoryInterface $mvcFactoryFactory The MVC factory
@@ -76,7 +76,7 @@ public function createDispatcher(CMSApplicationInterface $application, Input $in
if (!class_exists($className))
{
- $className = '\\Joomla\\CMS\\Dispatcher\\ComponentDispatcher';
+ $className = ComponentDispatcher::class;
}
return new $className($application, $input ?: $application->input, $this->mvcFactoryFactory);
diff --git a/libraries/src/Dispatcher/DispatcherFactoryInterface.php b/libraries/src/Dispatcher/ComponentDispatcherFactoryInterface.php
similarity index 68%
rename from libraries/src/Dispatcher/DispatcherFactoryInterface.php
rename to libraries/src/Dispatcher/ComponentDispatcherFactoryInterface.php
index c187b2056bfa5..646359de49b91 100644
--- a/libraries/src/Dispatcher/DispatcherFactoryInterface.php
+++ b/libraries/src/Dispatcher/ComponentDispatcherFactoryInterface.php
@@ -11,22 +11,24 @@
defined('_JEXEC') or die;
use Joomla\CMS\Application\CMSApplicationInterface;
+use Joomla\Input\Input;
/**
- * Dispatcher factory interface
+ * Component dispatcher factory interface
*
* @since 4.0.0
*/
-interface DispatcherFactoryInterface
+interface ComponentDispatcherFactoryInterface
{
/**
* Creates a dispatcher.
*
* @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(CMSApplicationInterface $application): DispatcherInterface;
+ public function createDispatcher(CMSApplicationInterface $application, Input $input = null): DispatcherInterface;
}
diff --git a/libraries/src/Dispatcher/Dispatcher.php b/libraries/src/Dispatcher/Dispatcher.php
new file mode 100644
index 0000000000000..c678c140719c8
--- /dev/null
+++ b/libraries/src/Dispatcher/Dispatcher.php
@@ -0,0 +1,64 @@
+app = $app;
+ $this->input = $input;
+ }
+
+ /**
+ * The application the dispatcher is working with.
+ *
+ * @return CMSApplication
+ *
+ * @since 4.0.0
+ */
+ protected function getApplication(): CMSApplication
+ {
+ return $this->app;
+ }
+}
diff --git a/libraries/src/Dispatcher/DispatcherInterface.php b/libraries/src/Dispatcher/DispatcherInterface.php
index c15f3d3fef47b..9e86f3cb17b4d 100644
--- a/libraries/src/Dispatcher/DispatcherInterface.php
+++ b/libraries/src/Dispatcher/DispatcherInterface.php
@@ -19,7 +19,7 @@
interface DispatcherInterface
{
/**
- * Dispatch a controller task.
+ * Runs the dispatcher.
*
* @return void
*
diff --git a/libraries/src/Dispatcher/ModuleDispatcher.php b/libraries/src/Dispatcher/ModuleDispatcher.php
new file mode 100644
index 0000000000000..7db5a47288343
--- /dev/null
+++ b/libraries/src/Dispatcher/ModuleDispatcher.php
@@ -0,0 +1,49 @@
+module->module . '/' . $this->module->module . '.php';
+
+ if (!file_exists($path))
+ {
+ return;
+ }
+
+ $this->loadLanguage();
+
+ // Execute the layout without the module context
+ $loader = static function($path, array $displayData)
+ {
+ extract($displayData);
+ include $path;
+ };
+
+ $loader($path, $this->getLayoutData());
+ }
+}
diff --git a/libraries/src/Dispatcher/ModuleDispatcherFactory.php b/libraries/src/Dispatcher/ModuleDispatcherFactory.php
new file mode 100644
index 0000000000000..1964de7c78c99
--- /dev/null
+++ b/libraries/src/Dispatcher/ModuleDispatcherFactory.php
@@ -0,0 +1,73 @@
+namespace = $namespace;
+ }
+
+ /**
+ * 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);
+ }
+}
diff --git a/libraries/src/Dispatcher/ModuleDispatcherFactoryInterface.php b/libraries/src/Dispatcher/ModuleDispatcherFactoryInterface.php
new file mode 100644
index 0000000000000..0fb88723003d8
--- /dev/null
+++ b/libraries/src/Dispatcher/ModuleDispatcherFactoryInterface.php
@@ -0,0 +1,35 @@
+dispatcherFactory = $dispatcherFactory;
}
diff --git a/libraries/src/Extension/ExtensionManagerInterface.php b/libraries/src/Extension/ExtensionManagerInterface.php
index 017ecd4d7a8ca..5f1c7699bbbe4 100644
--- a/libraries/src/Extension/ExtensionManagerInterface.php
+++ b/libraries/src/Extension/ExtensionManagerInterface.php
@@ -27,4 +27,16 @@ interface ExtensionManagerInterface
* @since 4.0.0
*/
public function bootComponent($component): ComponentInterface;
+
+ /**
+ * Boots the module with the given name.
+ *
+ * @param string $module The module to boot
+ * @param string $applicationName The application name
+ *
+ * @return ModuleInterface
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ public function bootModule($module, $applicationName): ModuleInterface;
}
diff --git a/libraries/src/Extension/ExtensionManagerTrait.php b/libraries/src/Extension/ExtensionManagerTrait.php
index 39190b9ec798b..6876e72327795 100644
--- a/libraries/src/Extension/ExtensionManagerTrait.php
+++ b/libraries/src/Extension/ExtensionManagerTrait.php
@@ -10,6 +10,7 @@
defined('JPATH_PLATFORM') or die;
+use Joomla\CMS\Dispatcher\ModuleDispatcherFactory;
use Joomla\CMS\Event\AbstractEvent;
use Joomla\DI\Container;
use Joomla\DI\Exception\ContainerNotFoundException;
@@ -28,7 +29,7 @@ trait ExtensionManagerTrait
*
* @var array
*/
- private $extensions = [ComponentInterface::class => []];
+ private $extensions = [ModuleInterface::class => [], ComponentInterface::class => []];
/**
* Boots the component with the given name.
@@ -50,6 +51,32 @@ public function bootComponent($component): ComponentInterface
return $this->loadExtension(ComponentInterface::class, $component, $path);
}
+ /**
+ * Boots the module with the given name.
+ *
+ * @param string $module The module to boot
+ * @param string $applicationName The application name
+ *
+ * @return ModuleInterface
+ *
+ * @since __DEPLOY_VERSION__
+ */
+ public function bootModule($module, $applicationName): ModuleInterface
+ {
+ // Normalize the module name
+ $module = strtolower(str_replace('mod_', '', $module));
+
+ // Path to to look for services
+ $path = JPATH_SITE . '/modules/mod_' . $module;
+
+ if ($applicationName === 'administrator')
+ {
+ $path = JPATH_ADMINISTRATOR . '/modules/mod_' . $module;
+ }
+
+ return $this->loadExtension(ModuleInterface::class, $module, $path);
+ }
+
/**
* Loads the extension.
*
@@ -57,7 +84,7 @@ public function bootComponent($component): ComponentInterface
* @param string $extensionName The extension name
* @param string $extensionPath The path of the extension
*
- * @return ComponentInterface
+ * @return ComponentInterface|ModuleInterface
*
* @since 4.0.0
*/
@@ -101,9 +128,17 @@ private function loadExtension($type, $extensionName, $extensionPath)
}
// Fallback to legacy
- if (!$container->has($type) && $type == ComponentInterface::class)
+ if (!$container->has($type))
{
- $container->set($type, new LegacyComponent('com_' . $extensionName));
+ switch ($type)
+ {
+ case ComponentInterface::class:
+ $container->set($type, new LegacyComponent('com_' . $extensionName));
+ break;
+ case ModuleInterface::class:
+ $container->set($type, new Module(new ModuleDispatcherFactory('')));
+ break;
+ }
}
$container->get(DispatcherInterface::class)->dispatch(
diff --git a/libraries/src/Extension/Module.php b/libraries/src/Extension/Module.php
new file mode 100644
index 0000000000000..4d1fd45c1bc70
--- /dev/null
+++ b/libraries/src/Extension/Module.php
@@ -0,0 +1,62 @@
+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 __DEPLOY_VERSION__
+ */
+ public function getDispatcher(\stdClass $module, CMSApplicationInterface $application, Input $input = null): DispatcherInterface
+ {
+ return $this->dispatcherFactory->createDispatcher($module, $application, $input);
+ }
+}
diff --git a/libraries/src/Extension/ModuleInterface.php b/libraries/src/Extension/ModuleInterface.php
new file mode 100644
index 0000000000000..ae492188220ba
--- /dev/null
+++ b/libraries/src/Extension/ModuleInterface.php
@@ -0,0 +1,36 @@
+set(
- DispatcherFactoryInterface::class,
+ ComponentDispatcherFactoryInterface::class,
function (Container $container)
{
- return new \Joomla\CMS\Dispatcher\DispatcherFactory(
- $this->namespace,
- $container->get(MVCFactoryFactoryInterface::class)
- );
+ return new \Joomla\CMS\Dispatcher\ComponentDispatcherFactory($this->namespace, $container->get(MVCFactoryFactoryInterface::class));
}
);
}
diff --git a/libraries/src/Extension/Service/Provider/Module.php b/libraries/src/Extension/Service/Provider/Module.php
new file mode 100644
index 0000000000000..89bb789ae569f
--- /dev/null
+++ b/libraries/src/Extension/Service/Provider/Module.php
@@ -0,0 +1,44 @@
+set(
+ ModuleInterface::class,
+ function (Container $container)
+ {
+ return new \Joomla\CMS\Extension\Module($container->get(ModuleDispatcherFactoryInterface::class));
+ }
+ );
+ }
+}
diff --git a/libraries/src/Extension/Service/Provider/ModuleDispatcherFactory.php b/libraries/src/Extension/Service/Provider/ModuleDispatcherFactory.php
new file mode 100644
index 0000000000000..8050dba383749
--- /dev/null
+++ b/libraries/src/Extension/Service/Provider/ModuleDispatcherFactory.php
@@ -0,0 +1,64 @@
+namespace = $namespace;
+ }
+
+ /**
+ * 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->set(
+ ModuleDispatcherFactoryInterface::class,
+ function (Container $container)
+ {
+ return new \Joomla\CMS\Dispatcher\ModuleDispatcherFactory($this->namespace);
+ }
+ );
+ }
+}
diff --git a/libraries/src/Helper/ModuleHelper.php b/libraries/src/Helper/ModuleHelper.php
index 70265259bc16b..8d131701e7942 100644
--- a/libraries/src/Helper/ModuleHelper.php
+++ b/libraries/src/Helper/ModuleHelper.php
@@ -183,31 +183,15 @@ public static function renderModule($module, $attribs = array())
// Get module path
$module->module = preg_replace('/[^A-Z0-9_\.-]/i', '', $module->module);
- $path = JPATH_BASE . '/modules/' . $module->module . '/' . $module->module . '.php';
- // Load the module
- if (file_exists($path))
- {
- $lang = Factory::getLanguage();
-
- $coreLanguageDirectory = JPATH_BASE;
- $extensionLanguageDirectory = dirname($path);
+ $dispatcher = $app->bootModule($module->module, $app->getName())->getDispatcher($module, $app);
- $langPaths = $lang->getPaths();
-
- // Only load the module's language file if it hasn't been already
- if (!$langPaths || (!isset($langPaths[$coreLanguageDirectory]) && !isset($langPaths[$extensionLanguageDirectory])))
- {
- // 1.5 or Core then 1.6 3PD
- $lang->load($module->module, $coreLanguageDirectory, null, false, true) ||
- $lang->load($module->module, $extensionLanguageDirectory, null, false, true);
- }
-
- $content = '';
+ // Check if we have a dispatcher
+ if ($dispatcher)
+ {
ob_start();
- include $path;
- $module->content = ob_get_contents() . $content;
- ob_end_clean();
+ $dispatcher->dispatch();
+ $module->content = ob_get_clean();
}
// Load the module chrome functions