/** * Creates a Category object based on a DB row. * * @param array $row The DB row containing Category data. * @return \VeryGoodTrip\Domain\Category */ protected function buildDomainObject($row) { $category = new Category(); $category->setId($row['category_id']); $category->setDescription($row['category_description']); $category->setName($row['category_name']); $category->setImage($row['category_image']); return $category; }