2026-06-02 13:47:36 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
2026-06-11 12:24:27 -05:00
|
|
|
* @package MokoSuiteBackup
|
|
|
|
|
* @subpackage com_mokosuitebackup
|
2026-06-02 13:47:36 -05:00
|
|
|
* @author Moko Consulting <hello@mokoconsulting.tech>
|
|
|
|
|
* @copyright Copyright (C) 2026 Moko Consulting. All rights reserved.
|
|
|
|
|
* @license GNU General Public License version 3 or later; see LICENSE
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
|
|
|
|
|
|
use Joomla\CMS\Dispatcher\ComponentDispatcherFactoryInterface;
|
|
|
|
|
use Joomla\CMS\Extension\ComponentInterface;
|
|
|
|
|
use Joomla\CMS\Extension\Service\Provider\ComponentDispatcherFactory;
|
|
|
|
|
use Joomla\CMS\Extension\Service\Provider\MVCFactory;
|
|
|
|
|
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
|
2026-06-11 12:24:27 -05:00
|
|
|
use Joomla\Component\MokoSuiteBackup\Administrator\Extension\MokoSuiteBackupComponent;
|
2026-06-02 13:47:36 -05:00
|
|
|
use Joomla\DI\Container;
|
|
|
|
|
use Joomla\DI\ServiceProviderInterface;
|
|
|
|
|
|
|
|
|
|
return new class () implements ServiceProviderInterface {
|
|
|
|
|
public function register(Container $container): void
|
|
|
|
|
{
|
2026-06-11 12:24:27 -05:00
|
|
|
$container->registerServiceProvider(new MVCFactory('\\Joomla\\Component\\MokoSuiteBackup'));
|
|
|
|
|
$container->registerServiceProvider(new ComponentDispatcherFactory('\\Joomla\\Component\\MokoSuiteBackup'));
|
2026-06-02 13:47:36 -05:00
|
|
|
|
|
|
|
|
$container->set(
|
|
|
|
|
ComponentInterface::class,
|
|
|
|
|
function (Container $container) {
|
2026-06-11 12:24:27 -05:00
|
|
|
$component = new MokoSuiteBackupComponent(
|
2026-06-02 13:47:36 -05:00
|
|
|
$container->get(ComponentDispatcherFactoryInterface::class)
|
|
|
|
|
);
|
|
|
|
|
$component->setMVCFactory($container->get(MVCFactoryInterface::class));
|
|
|
|
|
|
|
|
|
|
return $component;
|
|
|
|
|
}
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
};
|