public function getCategoryArticles($categoryId) { if ($categoryId == 0) { $this->getLatestArticles(); } else { $this->mArticles = Journal::GetCategoryArticles($categoryId); echo json_encode($this->mArticles); } }