Beitrag erstellen #13
@@ -67,7 +67,15 @@ class LocalArticleManager implements ArticleManagerDAO {
|
|||||||
|
|
||||||
public function getArticle($id)
|
public function getArticle($id)
|
||||||
{
|
{
|
||||||
// TODO: Implement getArticle() method.
|
$articles = $this->getAllArticles();
|
||||||
|
|
||||||
|
foreach ($articles as $article) {
|
||||||
|
if (isset($article['id']) && $article['id'] == $id) {
|
||||||
|
return $article;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function getAllArticles()
|
public function getAllArticles()
|
||||||
|
|||||||
Reference in New Issue
Block a user