path-refactoring + getter & setter

This commit is contained in:
NOrtmann1
2026-05-27 17:18:32 +02:00
parent 68d9224ea3
commit 8466a857c3
4 changed files with 38 additions and 8 deletions
+31 -1
View File
@@ -13,6 +13,7 @@ class Article
private $author;
private $creationDate;
private $category;
private $tags;
/**
* Konstruktor
@@ -98,10 +99,39 @@ class Article
* Gibt das Veröffentlichungsdatum des Artikels zurück.
* @return mixed
*/
public function getcreationDate()
public function getCreationDate()
{
return $this->creationDate;
}
/**
* Gibt die Kategorie eines Artikels zurück.
* @return string
*/
public function getCategory()
{
return $this->category;
}
/**
* Gibt die Schlagworte eines Artikels zurück.
* @return string[]
*/
public function getTags()
{
return $this->tags;
}
/**
* Setzt die Schlagworte eines Artikels.
* @param string[] $tags
*/
public function setTags($tags)
{
$this->tags = $tags;
}
}
?>