Backup #2017
| ID | 2017 |
| Dateipfad | /var/www/dev.campus.systemische-tools.de/src/ServiceProvider/InfrastructureServiceProvider.php |
| Version | 9 |
| Typ |
modified |
| Größe | 8.7 KB |
| Hash | d7950f2c6e8fcb36e67daafb0c3d7cdbd3447bf27e2bea094776884806ee5974 |
| Datum | 2025-12-28 14:24:46 |
| Geändert von | claude-code-hook |
| Grund | Claude Code Pre-Hook Backup vor Edit-Operation |
| Datei existiert |
Ja
|
Dateiinhalt
<?php
declare(strict_types=1);
// @responsibility: Register Infrastructure services in DI container
namespace ServiceProvider;
use Domain\Repository\ChunkExplorerRepositoryInterface;
use Domain\Repository\ChunkTaxonomyRepositoryInterface;
use Domain\Repository\CodeQualityRepositoryInterface;
use Domain\Repository\ContractRepositoryInterface;
use Domain\Repository\DependencyGraphRepositoryInterface;
use Domain\Repository\DokumentationRepositoryInterface;
use Domain\Repository\DokumentExplorerRepositoryInterface;
use Domain\Repository\EntityTaxonomyRepositoryInterface;
use Domain\Repository\FileAnalysisRepositoryInterface;
use Domain\Repository\FileBackupRepositoryInterface;
use Domain\Repository\KiProtokollRepositoryInterface;
use Domain\Repository\SeiteExplorerRepositoryInterface;
use Domain\Service\CodeScannerInterface;
use Domain\Service\SearchServiceInterface;
use Framework\Container;
use Infrastructure\Audit\AuditService;
use Infrastructure\CodeAnalysis\CodeQualityChecker;
use Infrastructure\CodeAnalysis\CodeScanner;
use Infrastructure\CodeAnalysis\JsFileParser;
use Infrastructure\CodeAnalysis\PhpFileParser;
use Infrastructure\CodeAnalysis\PythonFileParser;
use Infrastructure\Docs\ChunkAnalysisService;
use Infrastructure\Docs\ChunkAnalyzer;
use Infrastructure\Docs\ChunkDataRepository;
use Infrastructure\Docs\ChunkingService;
use Infrastructure\Docs\ChunkSearchService;
use Infrastructure\Docs\ChunkSyncService;
use Infrastructure\Docs\HybridSearchService;
use Infrastructure\Formatter\ApiResponseFormatter;
use Infrastructure\Logging\AuditLogger;
use Infrastructure\Persistence\ChunkExplorerRepository;
use Infrastructure\Persistence\ChunkTaxonomyRepository;
use Infrastructure\Persistence\CodeQualityRepository;
use Infrastructure\Persistence\ContractRepository;
use Infrastructure\Persistence\DependencyGraphRepository;
use Infrastructure\Persistence\DokumentationRepository;
use Infrastructure\Persistence\DokumentExplorerRepository;
use Infrastructure\Persistence\EntityTaxonomyRepository;
use Infrastructure\Persistence\FileAnalysisRepository;
use Infrastructure\Persistence\FileBackupRepository;
use Infrastructure\Persistence\KiProtokollRepository;
use Infrastructure\Persistence\SeiteExplorerRepository;
/**
* InfrastructureServiceProvider registers infrastructure and technical services.
*/
final class InfrastructureServiceProvider implements ServiceProviderInterface
{
public function register(Container $container): void
{
// Repositories
$container->set(DokumentExplorerRepository::class, fn (Container $c) => new DokumentExplorerRepository($c->get('pdo.dev')));
$container->set(SeiteExplorerRepository::class, fn (Container $c) => new SeiteExplorerRepository($c->get('pdo.dev')));
$container->set(ChunkExplorerRepository::class, fn (Container $c) => new ChunkExplorerRepository($c->get('pdo.dev')));
$container->set(DokumentationRepository::class, fn (Container $c) => new DokumentationRepository($c->get('pdo.dev')));
$container->set(FileBackupRepository::class, fn (Container $c) => new FileBackupRepository($c->get('pdo.dev')));
$container->set(ContractRepository::class, fn (Container $c) => new ContractRepository($c->get('pdo.dev')));
$container->set(KiProtokollRepository::class, fn (Container $c) => new KiProtokollRepository($c->get('pdo.dev')));
$container->set(FileAnalysisRepository::class, fn (Container $c) => new FileAnalysisRepository($c->get('pdo.dev')));
$container->set(DependencyGraphRepository::class, fn (Container $c) => new DependencyGraphRepository($c->get('pdo.dev')));
$container->set(CodeQualityRepository::class, fn (Container $c) => new CodeQualityRepository($c->get('pdo.dev')));
// Taxonomy Mapping Repositories (ki_content database)
$container->set(ChunkTaxonomyRepository::class, fn (Container $c) => new ChunkTaxonomyRepository($c->get('pdo.content')));
$container->set(EntityTaxonomyRepository::class, fn (Container $c) => new EntityTaxonomyRepository($c->get('pdo.content')));
// Interface aliases
$container->set(DokumentationRepositoryInterface::class, fn (Container $c) => $c->get(DokumentationRepository::class));
$container->set(DokumentExplorerRepositoryInterface::class, fn (Container $c) => $c->get(DokumentExplorerRepository::class));
$container->set(SeiteExplorerRepositoryInterface::class, fn (Container $c) => $c->get(SeiteExplorerRepository::class));
$container->set(ChunkExplorerRepositoryInterface::class, fn (Container $c) => $c->get(ChunkExplorerRepository::class));
$container->set(FileAnalysisRepositoryInterface::class, fn (Container $c) => $c->get(FileAnalysisRepository::class));
$container->set(DependencyGraphRepositoryInterface::class, fn (Container $c) => $c->get(DependencyGraphRepository::class));
$container->set(CodeQualityRepositoryInterface::class, fn (Container $c) => $c->get(CodeQualityRepository::class));
$container->set(FileBackupRepositoryInterface::class, fn (Container $c) => $c->get(FileBackupRepository::class));
$container->set(KiProtokollRepositoryInterface::class, fn (Container $c) => $c->get(KiProtokollRepository::class));
$container->set(ContractRepositoryInterface::class, fn (Container $c) => $c->get(ContractRepository::class));
$container->set(ChunkTaxonomyRepositoryInterface::class, fn (Container $c) => $c->get(ChunkTaxonomyRepository::class));
$container->set(EntityTaxonomyRepositoryInterface::class, fn (Container $c) => $c->get(EntityTaxonomyRepository::class));
// Code Analysis
$container->set(PhpFileParser::class, fn () => new PhpFileParser());
$container->set(PythonFileParser::class, fn () => new PythonFileParser());
$container->set(JsFileParser::class, fn () => new JsFileParser());
$container->set(CodeQualityChecker::class, fn () => new CodeQualityChecker());
$container->set(CodeScanner::class, function (Container $c) {
return new CodeScanner(
$c->get(FileAnalysisRepositoryInterface::class),
$c->get(CodeQualityRepositoryInterface::class),
$c->get(PhpFileParser::class),
$c->get(PythonFileParser::class),
$c->get(JsFileParser::class),
$c->get(CodeQualityChecker::class)
);
});
$container->set(CodeScannerInterface::class, fn (Container $c) => $c->get(CodeScanner::class));
// Documentation Services
$container->set(ChunkSearchService::class, function (Container $c) {
return new ChunkSearchService(
$c->get(\Infrastructure\AI\QdrantClient::class),
$c->get(\Infrastructure\AI\OllamaService::class)
);
});
$container->set(ChunkSyncService::class, function (Container $c) {
return new ChunkSyncService(
$c->get('pdo.dev'),
$c->get(\Infrastructure\AI\OllamaService::class),
$c->get(\Infrastructure\AI\QdrantClient::class)
);
});
$container->set(HybridSearchService::class, function (Container $c) {
return new HybridSearchService(
$c->get('pdo.dev'),
$c->get(\Infrastructure\AI\OllamaService::class)
);
});
// Interface binding for SearchService
$container->set(SearchServiceInterface::class, function (Container $c) {
return $c->get(HybridSearchService::class);
});
// ChunkDataRepository for chunk database operations
$container->set(ChunkDataRepository::class, function (Container $c) {
return new ChunkDataRepository($c->get('pdo.dev'));
});
// ChunkAnalyzer for LLM-based analysis
$container->set(ChunkAnalyzer::class, function (Container $c) {
return new ChunkAnalyzer($c->get(\Infrastructure\AI\OllamaService::class));
});
// ChunkAnalysisService orchestrates the analysis
$container->set(ChunkAnalysisService::class, function (Container $c) {
return new ChunkAnalysisService(
$c->get(ChunkDataRepository::class),
$c->get(ChunkAnalyzer::class)
);
});
$container->set(ChunkingService::class, function (Container $c) {
return new ChunkingService(
$c->get('pdo.dev'),
$c->get(DokumentationRepository::class)
);
});
// Application Services
$container->set(AuditLogger::class, fn (Container $c) => new AuditLogger($c->get('pdo.dev')));
$container->set(AuditService::class, fn (Container $c) => new AuditService($c->get('pdo.dev')));
$container->set(ApiResponseFormatter::class, fn () => new ApiResponseFormatter());
}
}
Vollständig herunterladen
Aktionen
Andere Versionen dieser Datei
| ID |
Version |
Typ |
Größe |
Datum |
| 2108 |
13 |
modified |
9.2 KB |
2025-12-29 08:48 |
| 2107 |
12 |
modified |
9.2 KB |
2025-12-29 08:47 |
| 2020 |
11 |
modified |
8.8 KB |
2025-12-28 14:26 |
| 2019 |
10 |
modified |
8.8 KB |
2025-12-28 14:26 |
| 2017 |
9 |
modified |
8.7 KB |
2025-12-28 14:24 |
| 1514 |
8 |
modified |
8.5 KB |
2025-12-25 20:08 |
| 1513 |
7 |
modified |
8.2 KB |
2025-12-25 20:08 |
| 1512 |
6 |
modified |
8.0 KB |
2025-12-25 20:08 |
| 1511 |
5 |
modified |
7.9 KB |
2025-12-25 20:08 |
| 1505 |
4 |
modified |
7.7 KB |
2025-12-25 17:50 |
| 1504 |
3 |
modified |
7.7 KB |
2025-12-25 17:49 |
| 1462 |
2 |
modified |
7.2 KB |
2025-12-25 17:01 |
| 1459 |
1 |
modified |
7.1 KB |
2025-12-25 17:01 |
← Zurück zur Übersicht