Example #1
0
 public function insertNewAddress(\AddressDTO $addressDTO)
 {
     try {
         $this->userAutentication();
         $newAddress = array(":" . LONGITUDE => $addressDTO->getLongitude(), ":" . LATITUDE => $addressDTO->getLatitude(), ":" . STREET => $addressDTO->getStreet(), ":" . NUMBER => $addressDTO->getNumber(), ":" . CAP => $addressDTO->getCap(), ":" . CITY => $addressDTO->getCity(), ":" . COUNTRY => $addressDTO->getCountry());
         $newAddressId = $this->getDB()->insert(ADDRESS_TABLE, $newAddress);
         //            $this->insertIntoActivityTable(PROFILE, INSERT, $newUserId);
         return $newAddressId;
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         throw $authExp;
     } catch (Exception $e) {
         throw $e;
     }
 }