本文整理匯總了PHP中SessionUtils::getNotificationToSend方法的典型用法代碼示例。如果您正苦於以下問題:PHP SessionUtils::getNotificationToSend方法的具體用法?PHP SessionUtils::getNotificationToSend怎麽用?PHP SessionUtils::getNotificationToSend使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類SessionUtils
的用法示例。
在下文中一共展示了SessionUtils::getNotificationToSend方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: setNotificationToSend
public static function setNotificationToSend($notificationList)
{
$notificationsToSend = SessionUtils::getNotificationToSend();
if (!is_null($notificationsToSend)) {
if (count($notificationsToSend) != 1) {
if (count($notificationList) == 1) {
$notificationsToSend[count($notificationsToSend)] = $notificationList;
SessionUtils::setSession(NOTIFICATION_LIST, $notificationsToSend);
} else {
$someOtherNotifications = array_merge($notificationsToSend, $notificationList);
SessionUtils::setSession(NOTIFICATION_LIST, $someOtherNotifications);
}
} else {
if (count($notificationList) == 1) {
$tmpNotifications = array();
$tmpNotifications[0] = $notificationsToSend;
$tmpNotifications[1] = $notificationList;
SessionUtils::setSession(NOTIFICATION_LIST, $tmpNotifications);
} else {
$notificationList[count($notificationList)] = $notificationsToSend;
SessionUtils::setSession(NOTIFICATION_LIST, $notificationList);
}
}
} else {
if (count($notificationList) == 1) {
$tmpNotificationList = array();
$tmpNotificationList[0] = $notificationList;
SessionUtils::setSession(NOTIFICATION_LIST, $tmpNotificationList);
} else {
SessionUtils::setSession(NOTIFICATION_LIST, $notificationList);
}
}
}