This commit is contained in:
NOrtmann1
2026-05-27 19:03:02 +02:00
parent 54220682cf
commit 9aa0793ab4
2 changed files with 6 additions and 8 deletions
+3 -7
View File
@@ -10,6 +10,7 @@ require_once 'Article.php';
class LocalArticleManager implements ArticleManagerDAO {
private $file = '../../data/articles.json';
private static $instance = null;
/**
* Gibt die LocalArticleManager-Instanz zurück.
@@ -24,11 +25,6 @@ class LocalArticleManager implements ArticleManagerDAO {
return self::$instance;
}
public function test()
{
return "Instanz wird übertragen!";
}
/**
* Speichert alle Artikel/Beiträge in der Datei.
* @param $articles
@@ -51,7 +47,7 @@ class LocalArticleManager implements ArticleManagerDAO {
public function addArticle($title, $content, $author, $category, array $tags)
{
$articles = $this->getAllArticles();
/*
$articles[] = [
"id" => count($articles)+1,
"title" => $title,
@@ -61,7 +57,7 @@ class LocalArticleManager implements ArticleManagerDAO {
"tags" => $tags,
"creationDate" => date("Y-m-d H:i:s")
];
*/
$this->saveArticle($articles);
}