public function parsePoi($row) { $parentCat = new ParentCategory(); $subCat = new Category(); $poiUser = new User(); $poiUser->initWithId($row['supUid'], $row['username'], $row['password'], $row['email'], $row['previlege'], $row['status']); $parentCatUser = $this->userController->find($row['supUid']); $subCatUser = $this->userController->find($row['subUid']); $parentCat->initWithId($row['supId'], $row['supCategory'], $parentCatUser, $row['supDate']); $subCat->initWithId($row['subId'], $parentCat, $row['subCategory'], $subCatUser, $row['subDate']); $contribution = new Contribution(); $contribution->setId($row['contributionId']); $poi = new POI(); $poi->initWithId($row['pId'], $row['name'], $row['address'], $row['position'], $subCat, $row['phone'], $row['poiEmail'], $row['website'], $row['poiDate'], $row['update_date'], $contribution, $poiUser); return $poi; }