editorconfig/test_tab2.php

40 lines
1.2 KiB
PHP
Raw Normal View History

2023-10-03 17:05:39 +02:00
<?php
/** TEST with tabsize == 2
* @package Depot.Administrator
* @subpackage com_depot
* @author XYZ
* @copyright (C) 2023 XYZ
* @license GNU General Public License version 2 or later; see LICENSE.md
* @since 0.0.1
*/
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;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
use KW4NZ\Component\Depot\Administrator\Extension\DepotComponent;
use Joomla\CMS\Extension\MVCComponent;
return new class implements ServiceProviderInterface
{
public function register(Container $container)
{
$container->registerServiceProvider(new ComponentDispatcherFactory('\\XYZ\\Component\\Depot'));
$container->registerServiceProvider(new MVCFactory('\\XYZ\\Component\\Depot'));
$container->set(
ComponentInterface::class,
function (Container $container)
{
$component = new DepotComponent($container->get(ComponentDispatcherFactoryInterface::class));
$component->setMVCFactory($container->get(MVCFactoryInterface::class));
return $component;
}
);
}
};