Backup #1802
| ID | 1802 |
| Dateipfad | /var/www/dev.campus.systemische-tools.de/src/ServiceProvider/ContentServiceProvider.php |
| Version | 21 |
| Typ |
modified |
| Größe | 8.0 KB |
| Hash | 5b5597eab351776227af756c8fa4291d6ff649eaae1eb9f17825d2c9a2f62874 |
| Datum | 2025-12-27 14:12:27 |
| 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 Content bounded context services in DI container
namespace ServiceProvider;
use Application\ContentCollectionService;
use Application\PipelineStepService;
use Domain\Repository\ChunkRepositoryInterface;
use Domain\Repository\ChunkTaxonomyRepositoryInterface;
use Domain\Repository\CollectionRepositoryInterface;
use Domain\Repository\ContentOrderRepositoryInterface;
use Domain\Repository\ContentRepositoryInterface;
use Domain\Repository\ContentSourceRepositoryInterface;
use Domain\Repository\ContentVersionRepositoryInterface;
use Domain\Repository\DocumentRepositoryInterface;
use Domain\Repository\EntityRepositoryInterface;
use Domain\Repository\EntityTaxonomyRepositoryInterface;
use Domain\Repository\OntologyRepositoryInterface;
use Domain\Repository\PipelineConfigRepositoryInterface;
use Domain\Repository\PipelineRepositoryInterface;
use Domain\Repository\PipelineRunRepositoryInterface;
use Domain\Repository\PipelineStepRepositoryInterface;
use Domain\Repository\RelationRepositoryInterface;
use Domain\Repository\SemanticSearchRepositoryInterface;
use Domain\Repository\StopwordRepositoryInterface;
use Domain\Repository\TaxonomyRepositoryInterface;
use Framework\Container;
use Infrastructure\Persistence\ChunkRepository;
use Infrastructure\Persistence\CollectionRepository;
use Infrastructure\Persistence\ContentOrderRepository;
use Infrastructure\Persistence\ContentRepository;
use Infrastructure\Persistence\ContentSourceRepository;
use Infrastructure\Persistence\ContentVersionRepository;
use Infrastructure\Persistence\DocumentRepository;
use Infrastructure\Persistence\EntityRepository;
use Infrastructure\Persistence\OntologyRepository;
use Infrastructure\Persistence\PipelineConfigRepository;
use Infrastructure\Persistence\PipelineRepository;
use Infrastructure\Persistence\PipelineRunRepository;
use Infrastructure\Persistence\PipelineStepRepository;
use Infrastructure\Persistence\RelationRepository;
use Infrastructure\Persistence\SemanticSearchRepository;
use Infrastructure\Persistence\StopwordRepository;
use Infrastructure\Persistence\TaxonomyRepository;
use Infrastructure\Validation\CollectionValidator;
/**
* ContentServiceProvider registers all content management services.
*/
final class ContentServiceProvider implements ServiceProviderInterface
{
public function register(Container $container): void
{
// Repositories
$container->set(CollectionRepository::class, fn (Container $c) => new CollectionRepository($c->get('pdo.dev'), $c->get('pdo.content')));
$container->set(PipelineRepository::class, fn (Container $c) => new PipelineRepository($c->get('pdo.content')));
$container->set(PipelineConfigRepository::class, fn (Container $c) => new PipelineConfigRepository($c->get('pdo.content')));
$container->set(PipelineRunRepository::class, fn (Container $c) => new PipelineRunRepository($c->get('pdo.content')));
$container->set(PipelineStepRepository::class, fn (Container $c) => new PipelineStepRepository($c->get('pdo.content')));
$container->set(ContentOrderRepository::class, fn (Container $c) => new ContentOrderRepository($c->get('pdo.content')));
$container->set(ContentVersionRepository::class, fn (Container $c) => new ContentVersionRepository($c->get('pdo.content')));
$container->set(ContentSourceRepository::class, fn (Container $c) => new ContentSourceRepository($c->get('pdo.content')));
$container->set(ContentRepository::class, fn (Container $c) => new ContentRepository(
$c->get('pdo.content'),
$c->get(ContentOrderRepository::class),
$c->get(ContentVersionRepository::class),
$c->get(ContentSourceRepository::class)
));
$container->set(TaxonomyRepository::class, fn (Container $c) => new TaxonomyRepository($c->get('pdo.content')));
$container->set(OntologyRepository::class, fn (Container $c) => new OntologyRepository($c->get('pdo.content')));
$container->set(DocumentRepository::class, fn (Container $c) => new DocumentRepository($c->get('pdo.content')));
$container->set(ChunkRepository::class, fn (Container $c) => new ChunkRepository($c->get('pdo.content')));
$container->set(RelationRepository::class, fn (Container $c) => new RelationRepository($c->get('pdo.content')));
$container->set(EntityRepository::class, fn (Container $c) => new EntityRepository($c->get('pdo.content')));
$container->set(SemanticSearchRepository::class, fn (Container $c) => new SemanticSearchRepository($c->get('pdo.content')));
$container->set(StopwordRepository::class, fn (Container $c) => new StopwordRepository($c->get('pdo.content')));
$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(CollectionRepositoryInterface::class, fn (Container $c) => $c->get(CollectionRepository::class));
$container->set(PipelineRepositoryInterface::class, fn (Container $c) => $c->get(PipelineRepository::class));
$container->set(PipelineConfigRepositoryInterface::class, fn (Container $c) => $c->get(PipelineConfigRepository::class));
$container->set(PipelineRunRepositoryInterface::class, fn (Container $c) => $c->get(PipelineRunRepository::class));
$container->set(PipelineStepRepositoryInterface::class, fn (Container $c) => $c->get(PipelineStepRepository::class));
$container->set(ContentOrderRepositoryInterface::class, fn (Container $c) => $c->get(ContentOrderRepository::class));
$container->set(ContentVersionRepositoryInterface::class, fn (Container $c) => $c->get(ContentVersionRepository::class));
$container->set(ContentSourceRepositoryInterface::class, fn (Container $c) => $c->get(ContentSourceRepository::class));
$container->set(ContentRepositoryInterface::class, fn (Container $c) => $c->get(ContentRepository::class));
$container->set(TaxonomyRepositoryInterface::class, fn (Container $c) => $c->get(TaxonomyRepository::class));
$container->set(OntologyRepositoryInterface::class, fn (Container $c) => $c->get(OntologyRepository::class));
$container->set(DocumentRepositoryInterface::class, fn (Container $c) => $c->get(DocumentRepository::class));
$container->set(ChunkRepositoryInterface::class, fn (Container $c) => $c->get(ChunkRepository::class));
$container->set(RelationRepositoryInterface::class, fn (Container $c) => $c->get(RelationRepository::class));
$container->set(EntityRepositoryInterface::class, fn (Container $c) => $c->get(EntityRepository::class));
$container->set(SemanticSearchRepositoryInterface::class, fn (Container $c) => $c->get(SemanticSearchRepository::class));
$container->set(StopwordRepositoryInterface::class, fn (Container $c) => $c->get(StopwordRepository::class));
$container->set(ChunkTaxonomyRepositoryInterface::class, fn (Container $c) => $c->get(ChunkTaxonomyRepository::class));
$container->set(EntityTaxonomyRepositoryInterface::class, fn (Container $c) => $c->get(EntityTaxonomyRepository::class));
// Services
$container->set(CollectionValidator::class, function (Container $c) {
return new CollectionValidator($c->get(CollectionRepository::class));
});
$container->set(ContentCollectionService::class, function (Container $c) {
return new ContentCollectionService(
$c->get(CollectionRepository::class),
$c->get(CollectionValidator::class)
);
});
$container->set(PipelineStepService::class, function (Container $c) {
return new PipelineStepService(
$c->get(PipelineConfigRepository::class),
$c->get(PipelineStepRepository::class),
$c->get(\Infrastructure\AI\ModelRegistry::class)
);
});
}
}
Vollständig herunterladen
Aktionen
Andere Versionen dieser Datei
| ID |
Version |
Typ |
Größe |
Datum |
| 1803 |
22 |
modified |
8.0 KB |
2025-12-27 14:12 |
| 1802 |
21 |
modified |
8.0 KB |
2025-12-27 14:12 |
| 1801 |
20 |
modified |
8.1 KB |
2025-12-27 14:12 |
| 1800 |
19 |
modified |
8.0 KB |
2025-12-27 14:12 |
| 1799 |
18 |
modified |
8.0 KB |
2025-12-27 14:11 |
| 1798 |
17 |
modified |
8.1 KB |
2025-12-27 14:11 |
| 1797 |
16 |
modified |
7.8 KB |
2025-12-27 14:11 |
| 1796 |
15 |
modified |
7.6 KB |
2025-12-27 14:10 |
| 1795 |
14 |
modified |
7.5 KB |
2025-12-27 14:10 |
| 1794 |
13 |
modified |
7.4 KB |
2025-12-27 14:10 |
| 1600 |
12 |
modified |
7.2 KB |
2025-12-27 00:16 |
| 1599 |
11 |
modified |
7.1 KB |
2025-12-27 00:16 |
| 1598 |
10 |
modified |
7.1 KB |
2025-12-27 00:16 |
| 1597 |
9 |
modified |
7.0 KB |
2025-12-27 00:16 |
| 1455 |
8 |
modified |
7.0 KB |
2025-12-25 17:01 |
| 1450 |
7 |
modified |
6.6 KB |
2025-12-25 17:00 |
| 1449 |
6 |
modified |
6.0 KB |
2025-12-25 17:00 |
| 1448 |
5 |
modified |
5.9 KB |
2025-12-25 17:00 |
| 1447 |
4 |
modified |
5.7 KB |
2025-12-25 17:00 |
| 1431 |
3 |
modified |
5.2 KB |
2025-12-25 16:59 |
| 1424 |
2 |
modified |
5.0 KB |
2025-12-25 16:59 |
| 1421 |
1 |
modified |
4.8 KB |
2025-12-25 16:59 |
← Zurück zur Übersicht