DokumentationRepository.php
Pfad: src/Domain/Dokumentation/DokumentationRepository.php
Ext: php
Größe: 957 Bytes
Geändert: 2026-07-15 21:43:48+02
<?php
declare(strict_types=1);
namespace Demo\Domain\Dokumentation;
/**
* Getriebener Port: Zugriff auf Dokumentationen. Adapter liegt in der Infrastruktur.
*/
interface DokumentationRepository
{
/**
* Liefert alle Dokumentationen fuer die Uebersicht.
*
* @return list<Dokumentation> Alle Eintraege.
*/
public function liste(): array;
/**
* Laedt eine Dokumentation anhand ihres Slugs.
*
* @param string $slug Eindeutiger Slug.
* @return Dokumentation|null Eintrag oder null, wenn nicht vorhanden.
*/
public function bySlug(string $slug): ?Dokumentation;
/**
* Speichert den Markdown-Inhalt einer Dokumentation.
*
* @param string $slug Ziel-Slug.
* @param string $markdownBody Neuer Inhalt als Markdown.
* @return bool True, wenn ein Datensatz aktualisiert wurde.
*/
public function speichereInhalt(string $slug, string $markdownBody): bool;
}