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


PHP Repository::addOption方法代碼示例

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


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

示例1: switchAction

 public function switchAction($action, $httpVars, $fileVars)
 {
     if ($action == "ls") {
         $dir = $httpVars["dir"];
         if ($dir == "/" || empty($dir)) {
             // MAILBOXES CASE
             $this->repository->addOption("PAGINATION_THRESHOLD", 500);
             $this->driverConf["SCANDIR_RESULT_SORTFONC"] = array("imapAccessDriver", "sortInboxFirst");
         } else {
             // MAILS LISTING CASE
             //$httpVars["dir"] = mb_convert_encoding($httpVars["dir"], "UTF7-IMAP", SystemTextEncoding::getEncoding());
             $this->driverConf["SCANDIR_RESULT_SORTFONC"] = array("imapAccessDriver", "inverseSort");
         }
     }
     parent::switchAction($action, $httpVars, $fileVars);
 }
開發者ID:thermalpaste,項目名稱:pydio-core,代碼行數:16,代碼來源:class.imapAccessDriver.php

示例2: createRepositoryFromArrayInst

 /**
  * See static method
  * @param string $index
  * @param array $repository
  * @return Repository
  */
 public function createRepositoryFromArrayInst($index, $repository)
 {
     $repo = new Repository($index, $repository["DISPLAY"], $repository["DRIVER"]);
     if (isset($repository["DISPLAY_ID"])) {
         $repo->setDisplayStringId($repository["DISPLAY_ID"]);
     }
     if (isset($repository["DESCRIPTION_ID"])) {
         $repo->setDescription($repository["DESCRIPTION_ID"]);
     }
     if (isset($repository["AJXP_SLUG"])) {
         $repo->setSlug($repository["AJXP_SLUG"]);
     }
     if (isset($repository["IS_TEMPLATE"]) && $repository["IS_TEMPLATE"]) {
         $repo->isTemplate = true;
         $repo->uuid = $index;
     }
     if (array_key_exists("DRIVER_OPTIONS", $repository) && is_array($repository["DRIVER_OPTIONS"])) {
         foreach ($repository["DRIVER_OPTIONS"] as $oName => $oValue) {
             $repo->addOption($oName, $oValue);
         }
     }
     // BACKWARD COMPATIBILITY!
     if (array_key_exists("PATH", $repository)) {
         $repo->addOption("PATH", $repository["PATH"]);
         $repo->addOption("CREATE", intval($repository["CREATE"]));
         $repo->addOption("RECYCLE_BIN", $repository["RECYCLE_BIN"]);
     }
     return $repo;
 }
開發者ID:rcmarotz,項目名稱:pydio-core,代碼行數:35,代碼來源:class.ConfService.php

示例3: createRepositoryFromArrayInst

 public function createRepositoryFromArrayInst($index, $repository)
 {
     $repo = new Repository($index, $repository["DISPLAY"], $repository["DRIVER"]);
     if (isset($repository["DISPLAY_ID"])) {
         $repo->setDisplayStringId($repository["DISPLAY_ID"]);
     }
     if (array_key_exists("DRIVER_OPTIONS", $repository) && is_array($repository["DRIVER_OPTIONS"])) {
         foreach ($repository["DRIVER_OPTIONS"] as $oName => $oValue) {
             $repo->addOption($oName, $oValue);
         }
     }
     // BACKWARD COMPATIBILITY!
     if (array_key_exists("PATH", $repository)) {
         $repo->addOption("PATH", $repository["PATH"]);
         $repo->addOption("CREATE", $repository["CREATE"]);
         $repo->addOption("RECYCLE_BIN", $repository["RECYCLE_BIN"]);
     }
     return $repo;
 }
開發者ID:umbecr,項目名稱:camilaframework,代碼行數:19,代碼來源:class.ConfService.php


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