Beispiel #1
0
 /**
  * @param int $guestAlertSID
  * @return SJB_GuestAlert
  * @throws Exception
  */
 public static function getObjectBySID($guestAlertSID)
 {
     $guestAlertInfo = self::getGuestAlertInfoBySID($guestAlertSID);
     if (empty($guestAlertInfo)) {
         throw new Exception('No such Guest Alert found');
     }
     $guestAlert = new SJB_GuestAlert($guestAlertInfo);
     $guestAlert->setSID($guestAlertSID);
     $guestAlert->addConfirmationKeyProperty(SJB_Array::get($guestAlertInfo, 'confirmation_key'));
     $guestAlert->addStatusProperty(SJB_Array::get($guestAlertInfo, 'status'));
     return $guestAlert;
 }