refactoring

This commit is contained in:
NOrtmann1
2026-05-26 18:55:42 +02:00
parent d7acca36fd
commit e128a31a34
4 changed files with 39 additions and 22 deletions
+23 -7
View File
@@ -13,7 +13,23 @@ class Article
private $author;
private $date;
/*
/**
* @param $id integer ID des Beitrages
* @param $title
* @param $content
* @param $author
* @param $date
*/
public function __construct($id, $title, $content, $author, $date)
{
$this->id = $id;
$this->title = $title;
$this->content = $content;
$this->author = $author;
$this->date = $date;
}
/**
* Gibt die ID eines Artikels zurück.
*/
public function getId()
@@ -21,7 +37,7 @@ class Article
return $this->id;
}
/*
/**
* Gibt den Titel eines Artikels zurück.
*/
public function getTitle()
@@ -29,7 +45,7 @@ class Article
return $this->title;
}
/*
/**
* Setzt den Titel eines Artikels.
*/
public function setTitle($title)
@@ -37,7 +53,7 @@ class Article
$this->title = $title;
}
/*
/**
* Gibt den Content eines Artikels zurück.
* TODO: Content muss noch definiert werden.
*/
@@ -46,7 +62,7 @@ class Article
return $this->content;
}
/*
/**
* Setzt den Content eines Artikels.
* TODO: Content muss noch definiert werden.
*/
@@ -55,7 +71,7 @@ class Article
$this->content = $content;
}
/*
/**
* Gibt den Autor eines Artikels zurück.
*/
public function getAuthor()
@@ -63,7 +79,7 @@ class Article
return $this->author;
}
/*
/**
* Gibt das Veröffentlichungsdatum des Artikels zurück.
*/
public function getDate()