OpenXE/classes/Modules/User/Bootstrap.php
2021-05-21 08:49:41 +02:00

42 lines
1.0 KiB
PHP

<?php
namespace Xentral\Modules\User;
use Xentral\Core\DependencyInjection\ContainerInterface;
use Xentral\Modules\User\Service\UserConfigService;
use Xentral\Modules\User\Service\UserPermissionService;
final class Bootstrap
{
/**
* @return array
*/
public static function registerServices()
{
return [
'UserConfigService' => 'onInitUserConfigService',
'UserPermissionService' => 'onInitUserPermissionService',
];
}
/**
* @param ContainerInterface $container
*
* @return UserConfigService
*/
public static function onInitUserConfigService(ContainerInterface $container)
{
return new UserConfigService($container->get('Database'));
}
/**
* @param ContainerInterface $container
*
* @return UserPermissionService
*/
public static function onInitUserPermissionService(ContainerInterface $container)
{
return new UserPermissionService($container->get('Database'));
}
}