/** * Creates an Article object based on a DB row. * * @param array $row The DB row containing Article data. * @return \MicroCMS\Domain\Article */ protected function buildDomainObject($row) { $article = new Article(); $article->setId($row['art_id']); $article->setTitle($row['art_title']); $article->setContent($row['art_content']); $article->setPrice($row['art_price']); $article->setGame($this->gameDAO->find($row['game_id'])); $article->setImages($this->getArticleImageDAO()->findAllByArticle($article->getId())); return $article; }