'onInitDatabaseLogService', 'DatabaseLogGateway' => 'onInitDatabaseLogGateway', 'LoggerConfigService' => 'onInitLoggerConfigService', ]; } /** * @param ServiceContainer $container * * @return DatabaseLogService */ public static function onInitDatabaseLogService(ServiceContainer $container): DatabaseLogService { return new DatabaseLogService($container->get('Database')); } /** * @param ServiceContainer $container * * @return DatabaseLogGateway */ public static function onInitDatabaseLogGateway(ServiceContainer $container): DatabaseLogGateway { return new DatabaseLogGateway($container->get('Database')); } /** * @param ServiceContainer $container * * @return LoggerConfigService */ public static function onInitLoggerConfigService(ServiceContainer $container): LoggerConfigService { return new LoggerConfigService(self::onInitCompanyConfigWrapper($container)); } /** * @param ContainerInterface $container * * @return CompanyConfigWrapper */ private static function onInitCompanyConfigWrapper(ContainerInterface $container): CompanyConfigWrapper { /** @var \ApplicationCore $app */ $app = $container->get('LegacyApplication'); return new CompanyConfigWrapper($app->erp); } }