当前位置: 首页>>代码示例>>PHP>>正文


PHP SessionUtils::getError方法代码示例

本文整理汇总了PHP中SessionUtils::getError方法的典型用法代码示例。如果您正苦于以下问题:PHP SessionUtils::getError方法的具体用法?PHP SessionUtils::getError怎么用?PHP SessionUtils::getError使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在SessionUtils的用法示例。


在下文中一共展示了SessionUtils::getError方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 public function index($userId = NULL, $responseDTO = NULL)
 {
     try {
         $this->getNotifications();
         $view = $this->getView();
         $model = $this->getModel();
         SessionUtils::setDashboardId($userId);
         $this->getNotifications();
         $view->uploadJS();
         if (!is_null(SessionUtils::getError())) {
             $view->setResponse(SessionUtils::getError());
             SessionUtils::setError(NULL);
         }
         $userList = $model->getUserList();
         $view->setArg('userList', $userList);
         SessionUtils::setLastPageVisited(USERLIST_CONTROLLER);
         SessionUtils::setNavigationSelectedItem(6);
         $view->loadPage();
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         SessionUtils::logout();
         header("Location:" . URL . LOGIN_CONTROLLER);
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:sbadi,项目名称:shareatrip,代码行数:27,代码来源:UserList.php

示例2: index

 public function index()
 {
     try {
         $this->getNotifications();
         $this->loadDashboardUser();
         $view = $this->getView();
         $model = $this->getModel();
         $view->uploadJS();
         if (!is_null(SessionUtils::getError())) {
             $view->setResponse(SessionUtils::getError());
             SessionUtils::setError(NULL);
         } else {
             $view->setArg("searchFriendsList", NULL);
         }
         $userLogged = SessionUtils::getUserLogged();
         $userProfile = SessionUtils::getDashboardId() !== $userLogged->getUserId() ? SessionUtils::getDashboardId() : $userLogged->getUserId();
         $friendList = $model->getUserFriendsList($userProfile);
         $view->setArg('friendsList', $friendList);
         SessionUtils::setLastPageVisited(FRIENDS_CONTROLLER);
         $view->setArg(LAST_NAV_ITEM_SELECTED, 6);
         $view->loadPage();
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         SessionUtils::logout();
         header("Location:" . URL . LOGIN_CONTROLLER);
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:sbadi,项目名称:shareatrip,代码行数:30,代码来源:Friends.php

示例3: index

 public function index()
 {
     //            $responseDTO = NULL) {
     try {
         $this->getNotifications();
         $this->loadDashboardUser();
         $view = $this->getView();
         $model = $this->getModel();
         $view->setArg(LAST_NAV_ITEM_SELECTED, 3);
         $view->uploadJS();
         if (!is_null(SessionUtils::getError())) {
             $view->setResponse(SessionUtils::getError());
             SessionUtils::setError(NULL);
         }
         $userInfo = $model->getUserInfoModel(SessionUtils::getDashboardId());
         $view->setArg('userInfo', $userInfo);
         SessionUtils::setLastPageVisited(PROFILE_SETTINGS_CONTROLLER);
         $view->loadPage();
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         SessionUtils::logout();
         header("Location:" . URL . LOGIN_CONTROLLER);
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:sbadi,项目名称:shareatrip,代码行数:27,代码来源:ProfileSettings.php

示例4: index

 function index()
 {
     $view = $this->getView();
     $view->getVoidForm();
     //        $view->uploadJS();
     if (!is_null(SessionUtils::getError())) {
         $view->setResponse(SessionUtils::getError());
         $view->setFormData(SessionUtils::getFormValue(), FORGOT_PWD_FORM);
         SessionUtils::setError(NULL);
         SessionUtils::setFormValue(NULL);
     }
     $view->loadPage();
 }
开发者ID:sbadi,项目名称:shareatrip,代码行数:13,代码来源:ForgotPwd.php

示例5: loadProfile

 function loadProfile($view, $model)
 {
     try {
         if (!is_null(SessionUtils::getAuthorId()) && !is_null(SessionUtils::getPost()) && !SessionUtils::isAdmin()) {
             $postDto = $model->getPostModel(SessionUtils::getPost());
             $view->setArg("notificationPost", $postDto);
             $commentPostList = $model->getCommentPostList(SessionUtils::getPost());
             $commentListIndex = 'notificationCommentList' . SessionUtils::getPost();
             $view->setArg($commentListIndex, $commentPostList);
             SessionUtils::setPost(NULL);
             SessionUtils::setAuthorId(NULL);
         } else {
             $userAlbumListDTO = $model->getUserAlbumList(SessionUtils::getDashboardId());
             $view->setArg('userAlbumList', $userAlbumListDTO);
             $postList = $model->getPostsListModel(SessionUtils::getDashboardId());
             $view->setArg('postList', $postList);
             if (!is_null($postList)) {
                 for ($i = 0; $i < sizeof($postList); $i++) {
                     $index = 'post' . $i;
                     $postId = $postList[$index]->getPostId();
                     $commentPostList = $model->getCommentPostList($postId);
                     $commentListIndex = 'commentPostList' . $postId;
                     $view->setArg($commentListIndex, $commentPostList);
                 }
             }
             if (!is_null(SessionUtils::getError())) {
                 $view->setResponse(SessionUtils::getError());
                 if (!is_null(SessionUtils::getFormValue())) {
                     $view->setFormData(SessionUtils::getFormValue(), WRITE_POST_FORM);
                 }
                 SessionUtils::setError(NULL);
                 SessionUtils::setFormValue(NULL);
             }
         }
         $view->loadPage();
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         throw $authExp;
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:sbadi,项目名称:shareatrip,代码行数:43,代码来源:Profile.php

示例6: index

 function index()
 {
     //$albumId=NULL,$photoId=NULL, $responseDTO = NULL
     try {
         $this->getNotifications();
         $this->loadDashboardUser();
         $view = $this->getView();
         $model = $this->getModel();
         $view->setArg(LAST_NAV_ITEM_SELECTED, 5);
         $view->uploadJS();
         SessionUtils::setLastPageVisited(PHOTO_CONTROLLER);
         $view->setArg('userCanWrite', SessionUtils::userCanWrite());
         $albumPhotoListDTO = $model->getAlbumPhotoListModel(SessionUtils::getAlbumId());
         $view->setArg('albumPhotoList', $albumPhotoListDTO);
         if (!is_null(SessionUtils::getPhotoId()) && !is_null(SessionUtils::getAlbumId())) {
             SessionUtils::setPhotoId(NULL);
             SessionUtils::setAlbumId(NULL);
         } else {
             if (!is_null(SessionUtils::getAlbumId())) {
                 if (!is_null(SessionUtils::getError())) {
                     $view->setResponse(SessionUtils::getError());
                     SessionUtils::setError(NULL);
                 }
                 //                    if (!$view->getArg('userCanWrite')) {
                 SessionUtils::setAlbumId(NULL);
                 //                    }
             }
         }
         $view->loadPage();
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         SessionUtils::logout();
         header("Location:" . URL . LOGIN_CONTROLLER);
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:sbadi,项目名称:shareatrip,代码行数:38,代码来源:Photo.php

示例7: index

 function index()
 {
     try {
         $this->getNotifications();
         $userLogged = SessionUtils::getUserLogged();
         $view = $this->getView();
         $model = $this->getModel();
         SessionUtils::setDashboardId($userLogged->getUserId());
         $view->uploadJS();
         if (!is_null(SessionUtils::getError())) {
             $view->setResponse(SessionUtils::getError());
             SessionUtils::setError(NULL);
         }
         SessionUtils::setLastPageVisited(HOME_CONTROLLER);
         $homePostList = $model->getHomePostsListModel($userLogged->getUserId());
         $view->setArg('homePostList', $homePostList);
         if (!is_null($homePostList)) {
             for ($i = 0; $i < sizeof($homePostList); $i++) {
                 $index = 'post' . $i;
                 $postId = $homePostList[$index]->getPostId();
                 $commentPostList = $model->getCommentPostList($postId);
                 $commentListIndex = 'commentPostList' . $postId;
                 $view->setArg($commentListIndex, $commentPostList);
             }
         }
         $userInfo = $model->getUserInfoModel(SessionUtils::getDashboardId());
         $view->setArg('userInfo', $userInfo);
         $view->setArg(LAST_NAV_ITEM_SELECTED, 0);
         $view->loadPage();
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         SessionUtils::logout();
         header("Location:" . URL . LOGIN_CONTROLLER);
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:sbadi,项目名称:shareatrip,代码行数:38,代码来源:Home.php

示例8: index

 function index()
 {
     try {
         $this->getNotifications();
         $this->setAllNotificationsAsRead();
         $view = $this->getView();
         $model = $this->getModel();
         $view->uploadJS();
         if (!is_null(SessionUtils::getError())) {
             $view->setResponse(SessionUtils::getError());
             SessionUtils::setError(NULL);
         }
         $userNotificationList = $model->getUserNotification();
         $view->setArg('userNotificationList', $userNotificationList);
         SessionUtils::setLastPageVisited(NOTIFICATION_CONTROLLER);
         $view->setArg(LAST_NAV_ITEM_SELECTED, 2);
         $view->loadPage();
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (Exception $e) {
         throw $e;
     }
 }
开发者ID:sbadi,项目名称:shareatrip,代码行数:23,代码来源:Notification.php

示例9: 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;
     }
 }
开发者ID:sbadi,项目名称:shareatrip,代码行数:36,代码来源:Album.php


注:本文中的SessionUtils::getError方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。