OntologyRepositoryInterface.php
- Pfad:
src/Domain/Repository/OntologyRepositoryInterface.php - Namespace: Domain\Repository
- Zeilen: 73 | Größe: 2,369 Bytes
- Geändert: 2025-12-26 07:01:17 | Gescannt: 2025-12-31 10:22:15
Code Hygiene Score: 100
- Dependencies: 100 (25%)
- LOC: 100 (20%)
- Methods: 100 (20%)
- Secrets: 100 (15%)
- Classes: 100 (10%)
- Magic Numbers: 100 (10%)
Keine Issues gefunden.
Klassen 1
-
OntologyRepositoryInterfaceinterface Zeile 9
Funktionen 9
-
findAll()public Zeile 16 -
getStats()public Zeile 23 -
find()public Zeile 30 -
create()public Zeile 38 -
update()public Zeile 45 -
delete()public Zeile 52 -
findForSelect()public Zeile 59 -
findClassifiedEntities()public Zeile 66 -
countClassifiedEntities()public Zeile 71
Verwendet von 5
- ContentServiceProvider.php use
- OntologyController.php constructor
- OntologyController.php use
- OntologyRepository.php implements
- OntologyRepository.php use
Versionen 1
-
v1
2025-12-26 07:01 | claude-code-hook | modified
Claude Code Pre-Hook Backup vor Edit-Operation
Code
<?php
declare(strict_types=1);
namespace Domain\Repository;
// @responsibility: Interface für Ontology-Persistenz (CRUD + Klassenhierarchie)
interface OntologyRepositoryInterface
{
/**
* Holt alle Ontologie-Klassen mit Statistiken.
*
* @return array<int, array{id: int, name: string, parent_class_id: ?int, description: ?string, properties: ?string, entity_count: int, subclass_count: int}>
*/
public function findAll(): array;
/**
* Holt Ontologie-Statistiken.
*
* @return array{total_classes: int, root_classes: int, classified_entities: int}
*/
public function getStats(): array;
/**
* Findet eine Klasse nach ID.
*
* @return array{id: int, name: string, parent_class_id: ?int, description: ?string, properties: ?string}|null
*/
public function find(int $id): ?array;
/**
* Erstellt eine neue Ontologie-Klasse.
*
* @param array<string, mixed> $properties JSON-Properties
* @return int ID der neuen Klasse
*/
public function create(string $name, ?int $parentId = null, ?string $description = null, array $properties = []): int;
/**
* Aktualisiert eine Ontologie-Klasse.
*
* @param array<string, mixed> $properties JSON-Properties
*/
public function update(int $id, string $name, ?int $parentId = null, ?string $description = null, array $properties = []): bool;
/**
* Löscht eine Ontologie-Klasse (nur wenn keine Subklassen vorhanden).
*
* @return bool False wenn Subklassen vorhanden, True bei Erfolg
*/
public function delete(int $id): bool;
/**
* Holt Klassen für Select-Dropdown (minimale Daten).
*
* @return array<int, array{id: int, name: string}>
*/
public function findForSelect(): array;
/**
* Holt klassifizierte Entities mit Ontologie-Klassen und Relationen.
*
* @return array<int, array{entity_id: int, entity_name: string, entity_type: string, description: ?string, class_name: string, confidence: float, relations: string}>
*/
public function findClassifiedEntities(string $search = '', string $classFilter = '', int $limit = 50, int $offset = 0): array;
/**
* Zählt klassifizierte Entities.
*/
public function countClassifiedEntities(string $search = '', string $classFilter = ''): int;
}