diff --git a/php/controller/createArticle-controller.php b/php/controller/createArticle-controller.php index e92ebe9..eaee480 100644 --- a/php/controller/createArticle-controller.php +++ b/php/controller/createArticle-controller.php @@ -3,8 +3,8 @@ if (!isset($abs_path)) { require_once "../../path.php"; } -/* -require_once '/php/model/LocalArticleManager.php'; + +require_once $abs_path . '/php/model/LocalArticleManager.php'; try { $articleManager = ArticleManager::getInstance(); @@ -30,5 +30,5 @@ if ($_SERVER["REQUEST_METHOD"] === "POST") { header("location: index.php"); exit(); } -*/ + ?> \ No newline at end of file diff --git a/php/model/Article.php b/php/model/Article.php index 8c9cdee..df1d151 100644 --- a/php/model/Article.php +++ b/php/model/Article.php @@ -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; + } + + + } ?> \ No newline at end of file diff --git a/php/model/ArticleManager.php b/php/model/ArticleManager.php index e64a049..a609f2f 100644 --- a/php/model/ArticleManager.php +++ b/php/model/ArticleManager.php @@ -2,7 +2,7 @@ if (!isset($abs_path)) { require_once "path.php"; } -require_once '/php/model/LocalArticleManager.php'; +require_once $abs_path . '/php/model/LocalArticleManager.php'; /** * Die Klasse beinhaltet alle Methoden für die Operation mit den Artikel-Daten. diff --git a/php/model/LocalArticleManager.php b/php/model/LocalArticleManager.php index 2e6578e..0b3c778 100644 --- a/php/model/LocalArticleManager.php +++ b/php/model/LocalArticleManager.php @@ -1,8 +1,8 @@