public function getMemberNotifications($memberID, $config, $dbConnection = null) { $memberNotifications = null; try { $memberNotifications = new MemberNotifications(); $rawBandMemberNotifications = BandMemberNotificationDao::selectBandMemberNotifications($memberID, $dbConnection); $memberNotifications->setVariable(MemberNotifications::BAND_MEMBER_NOTIFICATIONS, NotificationController::processBandMemberNotifications($rawBandMemberNotifications, $config)); } catch (Exception $ex) { echo "addBandMember error: " . $ex->getMessage(); $memberNotifications = null; } return $memberNotifications; }
public function updateBandMemberNotification($bandMemberNotificationDetails, $dbConnection = null) { $preparedStatement = null; $processed = false; try { if ($bandMemberNotificationDetails->getVariable(BandMemberNotification::MEMBER_ID) !== null) { $bandMemberUpdateQuery = BandMemberNotificationDao::getBandMemberNotificationUpdateQuery($bandMemberNotificationDetails); $preparedStatement = BandMemberNotificationDao::getBandMemberNotificationUpdatePreparedStatement($bandMemberUpdateQuery, $bandMemberNotificationDetails, $dbConnection); if ($preparedStatement->execute()) { $processed = true; } $preparedStatement = null; } } catch (Exception $ex) { echo 'Caught exception: ' . $ex->getMessage() . "\n"; $processed = false; } return $processed; }