當前位置: 首頁>>代碼示例>>PHP>>正文


PHP FileUtils::deleteAlbumDirOnServer方法代碼示例

本文整理匯總了PHP中FileUtils::deleteAlbumDirOnServer方法的典型用法代碼示例。如果您正苦於以下問題:PHP FileUtils::deleteAlbumDirOnServer方法的具體用法?PHP FileUtils::deleteAlbumDirOnServer怎麽用?PHP FileUtils::deleteAlbumDirOnServer使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在FileUtils的用法示例。


在下文中一共展示了FileUtils::deleteAlbumDirOnServer方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: deleteAlbumModel

 function deleteAlbumModel($albumId)
 {
     $responseDTO = new ResponseDTO(DELETE_ALBUM_FORM);
     try {
         $userLogged = SessionUtils::getUserLogged();
         $defaultAlbumId = $userLogged->getDefaultAlbumId();
         if ($defaultAlbumId == $albumId) {
             $responseDTO->setErrField(ERROR_RESPONSE, "Non puoi eliminare il tuo album di default");
             return $responseDTO;
         }
         $albumDAO = new AlbumDAO();
         $deletePhotoInAlbum = $albumDAO->deletePhotoInAlbum($albumId);
         $deletedAlbum = $albumDAO->deleteAlbumById($albumId);
         if ($deletedAlbum != 1) {
             $responseDTO->setErrField(ERROR_RESPONSE, "Errore durante l'eliminazione dell'album");
             $responseDTO->setSubElementId($albumId);
         } else {
             $userLogged = SessionUtils::getUserLogged();
             FileUtils::deleteAlbumDirOnServer($userLogged->getUserId(), $albumId);
             if (isset($_POST[JAVASCRIPT_ON]) && $_POST[JAVASCRIPT_ON] === "Y") {
                 $responseDTO->setResponseSucc("#album" . $albumId);
             } else {
                 $responseDTO->setResponseSucc("Album eliminato con successo!");
             }
         }
         return $responseDTO;
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         throw $authExp;
     } catch (Exception $e) {
         throw $e;
     }
 }
開發者ID:sbadi,項目名稱:shareatrip,代碼行數:34,代碼來源:Album_model.php

示例2: deleteUser

 public function deleteUser($userId)
 {
     try {
         $model = $this->getModel();
         $deletedUser = $model->deleteUserModel($userId);
         FileUtils::deleteAlbumDirOnServer($userId, NULL);
         if (isset($_POST[JAVASCRIPT_ON]) && $_POST[JAVASCRIPT_ON] === "Y") {
             echo json_encode($deletedUser->jsonSerialize());
         } else {
             $responseDTO = new ResponseDTO(DELETE_USER_FORM);
             $responseDTO->setResponseSucc("Utente eliminato con successo");
             SessionUtils::setError($responseDTO);
             header("Location: " . URL . USERLIST_CONTROLLER);
             exit;
         }
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         parent::userNotLogged($authExp);
     } catch (Exception $e) {
         throw $e;
     }
 }
開發者ID:sbadi,項目名稱:shareatrip,代碼行數:23,代碼來源:Friends.php

示例3: deleteUserForm

 public function deleteUserForm()
 {
     try {
         $model = $this->getModel();
         $deletedUser = $model->deleteUserModel();
         $userLogged = SessionUtils::getUserLogged();
         FileUtils::deleteAlbumDirOnServer($userLogged->getUserId(), NULL);
         SessionUtils::logout();
         if (isset($_POST[JAVASCRIPT_ON]) && $_POST[JAVASCRIPT_ON] === "Y") {
             echo json_encode($deletedUser->jsonSerialize());
         } else {
             header("Location: " . URL . LOGIN_CONTROLLER);
             exit;
         }
     } catch (UserNotAuthenticatedExceptionDTO $authExp) {
         parent::userNotLogged($authExp);
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (Exception $e) {
         throw $e;
     }
 }
開發者ID:sbadi,項目名稱:shareatrip,代碼行數:22,代碼來源:ProfileSettings.php


注:本文中的FileUtils::deleteAlbumDirOnServer方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。