From 9fec4cd5607ab2ad74c17dd7e5510c425c43cb07 Mon Sep 17 00:00:00 2001 From: Allon Moritz Date: Thu, 31 May 2018 09:31:53 +0200 Subject: [PATCH] Change com_cache to services (#20613) --- .../components/com_cache/dispatcher.php | 29 ---------- .../com_cache/services/provider.php | 54 +++++++++++++++++++ 2 files changed, 54 insertions(+), 29 deletions(-) delete mode 100644 administrator/components/com_cache/dispatcher.php create mode 100644 administrator/components/com_cache/services/provider.php diff --git a/administrator/components/com_cache/dispatcher.php b/administrator/components/com_cache/dispatcher.php deleted file mode 100644 index 6f1f5d436deb5..0000000000000 --- a/administrator/components/com_cache/dispatcher.php +++ /dev/null @@ -1,29 +0,0 @@ -registerServiceProvider(new MVCFactoryFactory('\\Joomla\\Component\\Cache')); + $container->registerServiceProvider(new DispatcherFactory('\\Joomla\\Component\\Cache<')); + + $container->set( + ComponentInterface::class, + function (Container $container) + { + $component = new MVCComponent($container->get(DispatcherFactoryInterface::class)); + + $component->setMvcFactoryFactory($container->get(MVCFactoryFactoryInterface::class)); + + return $component; + } + ); + } +};