45 lines
1.1 KiB
PHP
45 lines
1.1 KiB
PHP
<?php
|
|
|
|
require_once "Comment.php";
|
|
|
|
/**
|
|
* Schnittstelle für die Verwaltung von Kommentaren.
|
|
*
|
|
* Definiert die grundlegenden Methoden zum
|
|
* Speichern und Laden von Kommentaren.
|
|
*
|
|
* @author Caroline Schulte
|
|
*/
|
|
interface CommentManagerDAO
|
|
{
|
|
/**
|
|
* Speichert einen neuen Kommentar zu einem Beitrag.
|
|
*
|
|
* Optional kann eine parentCommentId übergeben werden,
|
|
* wenn der Kommentar eine Antwort auf einen anderen Kommentar ist.
|
|
*
|
|
* @param int $articleId ID des Beitrags
|
|
* @param string $author Autor des Kommentars
|
|
* @param string $content Inhalt des Kommentars
|
|
* @param int|null $parentCommentId ID des Eltern-Kommentars oder null
|
|
*
|
|
* @return void
|
|
*/
|
|
public function addComment(
|
|
$articleId,
|
|
$author,
|
|
$content,
|
|
$parentCommentId = null
|
|
);
|
|
|
|
/**
|
|
* Gibt alle Kommentare eines Beitrags zurück.
|
|
*
|
|
* @param int $articleId ID des Beitrags
|
|
*
|
|
* @return Comment[] Liste der Kommentare
|
|
*/
|
|
public function getCommentsByArticle(
|
|
$articleId
|
|
);
|
|
} |