public function parseParentCatgory($row)
 {
     $user = new User();
     $user->initWithId($row['userId'], $row['username'], $row['password'], $row['email'], $row['previlege'], $row['status']);
     $parent = new ParentCategory();
     $parent->initWithId($row['supId'], $row['category'], $user, $row['supDate']);
     return $parent;
 }
 private function parseCategory($row)
 {
     try {
         $parent = new ParentCategory();
         $parent->initWithId($row['supId'], $row['category'], $this->usersController->find($row['supUserId']), $row['date']);
         $category = new Category();
         $category->initWithId($row['subId'], $parent, $row['subCategory'], $this->usersController->find($row['userId']), $row['date']);
         return $category;
     } catch (Exception $e) {
         echo "Exception : " . $e->getMessage() . "<Br>";
         return false;
     }
 }
 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;
 }