From 38274a9f08a03d9d79b2699413a89c0dbf5b33f5 Mon Sep 17 00:00:00 2001 From: Jonathan Miller <1+jmiller@noreply.git.mokoconsulting.tech> Date: Sat, 27 Jun 2026 20:25:37 +0000 Subject: [PATCH] feat: add webservices service provider --- .../services/provider.php | 35 +++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 source/plg_webservices_mokosuitebooking/services/provider.php diff --git a/source/plg_webservices_mokosuitebooking/services/provider.php b/source/plg_webservices_mokosuitebooking/services/provider.php new file mode 100644 index 0000000..c6fef13 --- /dev/null +++ b/source/plg_webservices_mokosuitebooking/services/provider.php @@ -0,0 +1,35 @@ + + * @license GPL-3.0-or-later + */ + +defined('_JEXEC') or die; + +use Joomla\CMS\Extension\PluginInterface; +use Joomla\CMS\Factory; +use Joomla\CMS\Plugin\PluginHelper; +use Joomla\DI\Container; +use Joomla\DI\ServiceProviderInterface; +use Joomla\Event\DispatcherInterface; +use Moko\Plugin\WebServices\MokoSuiteBooking\Extension\MokoSuiteBooking; + +return new class () implements ServiceProviderInterface { + public function register(Container $container): void + { + $container->set( + PluginInterface::class, + function (Container $container) { + $dispatcher = $container->get(DispatcherInterface::class); + $plugin = new MokoSuiteBooking( + $dispatcher, + (array) PluginHelper::getPlugin('webservices', 'mokosuitebooking') + ); + $plugin->setApplication(Factory::getApplication()); + + return $plugin; + } + ); + } +};