本文整理汇总了PHP中SessionUtils::getAlbumId方法的典型用法代码示例。如果您正苦于以下问题:PHP SessionUtils::getAlbumId方法的具体用法?PHP SessionUtils::getAlbumId怎么用?PHP SessionUtils::getAlbumId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SessionUtils
的用法示例。
在下文中一共展示了SessionUtils::getAlbumId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: index
public function index()
{
try {
$this->getNotifications();
$this->loadDashboardUser();
SessionUtils::setLastPageVisited(ALBUM_CONTROLLER);
$view = $this->getView();
$model = $this->getModel();
$view->uploadJS();
$view->setArg('userCanWrite', SessionUtils::userCanWrite());
$view->setArg('albumOwnerId', SessionUtils::getDashboardId());
if (!is_null(SessionUtils::getAlbumId())) {
$albumDTO = $model->getAlbumModel(SessionUtils::getAlbumId());
$view->setArg("notificationAlbum", $albumDTO);
SessionUtils::setAlbumId(NULL);
} else {
$userAlbums = $model->getUserAlbumsModel(SessionUtils::getDashboardId());
$view->setArg('userAlbumList', $userAlbums);
if (!is_null(SessionUtils::getError())) {
$view->setResponse(SessionUtils::getError());
$view->setFormData(SessionUtils::getFormValue(), ADD_ALBUM_FORM);
SessionUtils::setError(NULL);
SessionUtils::setFormValue(NULL);
}
}
$view->setArg(LAST_NAV_ITEM_SELECTED, 5);
$view->loadPage();
} catch (PDOException $pdoe) {
throw $pdoe;
} catch (UserNotAuthenticatedExceptionDTO $authExp) {
SessionUtils::logout();
header("Location:" . URL . LOGIN_CONTROLLER);
} catch (Exception $e) {
throw $e;
}
}
示例2: userCanReadAlbum
public static function userCanReadAlbum()
{
$albumId = SessionUtils::getAlbumId();
$albumList = SessionUtils::getUserLoggedAlbumList();
return array_key_exists($albumId, $albumList);
}
示例3: addPhoto
public function addPhoto()
{
try {
$model = $this->getModel();
$newPhotoAjax = NULL;
if (isset($_POST[JAVASCRIPT_ON]) && $_POST[JAVASCRIPT_ON] === "Y") {
$newPhoto = $model->addPhotoModel($newPhotoAjax, SessionUtils::getAlbumId());
echo json_encode($newPhoto->jsonSerialize());
} else {
$newPhoto = $model->addPhotoModel($newPhotoAjax, SessionUtils::getAlbumId());
if (get_class($newPhoto) === PHOTODTO) {
$responseDTO = new ResponseDTO(ADD_PHOTO_FORM);
$responseDTO->setResponseSucc("Foto aggiunta con successo!");
SessionUtils::setError($responseDTO);
} else {
SessionUtils::setError($newPhoto);
}
header("Location: " . URL . PHOTO_CONTROLLER);
exit;
}
} catch (PDOException $pdoe) {
throw $pdoe;
} catch (UserNotAuthenticatedExceptionDTO $authExp) {
parent::userNotLogged($authExp);
} catch (Exception $e) {
throw $e;
}
}