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


PHP ConfService::setConf方法代码示例

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


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

示例1: initRepository

 public function initRepository()
 {
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     if (!function_exists('ssh2_connect')) {
         throw new Exception("You must have the php ssh2 extension active!");
     }
     ConfService::setConf("PROBE_REAL_SIZE", false);
     $path = $this->repository->getOption("PATH");
     $recycle = $this->repository->getOption("RECYCLE_BIN");
     $this->detectStreamWrapper(true);
     $this->urlBase = "pydio://" . $this->repository->getId();
     restore_error_handler();
     if (!file_exists($this->urlBase)) {
         if ($this->repository->getOption("CREATE")) {
             $test = @mkdir($this->urlBase);
             if (!$test) {
                 throw new AJXP_Exception("Cannot create path ({$path}) for your repository! Please check the configuration.");
             }
         } else {
             throw new AJXP_Exception("Cannot find base path ({$path}) for your repository! Please check the configuration!");
         }
     }
     if ($recycle != "") {
         RecycleBinManager::init($this->urlBase, "/" . $recycle);
     }
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:30,代码来源:class.sftpAccessDriver.php

示例2: initRepository

 public function initRepository()
 {
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     if ($this->getFilteredOption("PROBE_REAL_SIZE", $this->repository->getId()) == true) {
         // PASS IT TO THE WRAPPER
         ConfService::setConf("PROBE_REAL_SIZE", $this->getFilteredOption("PROBE_REAL_SIZE", $this->repository->getId()));
     }
     $create = $this->repository->getOption("CREATE");
     $path = SystemTextEncoding::toStorageEncoding($this->repository->getOption("PATH"));
     $recycle = $this->repository->getOption("RECYCLE_BIN");
     $chmod = $this->repository->getOption("CHMOD_VALUE");
     $wrapperData = $this->detectStreamWrapper(true);
     $this->wrapperClassName = $wrapperData["classname"];
     $this->urlBase = $wrapperData["protocol"] . "://" . $this->repository->getId();
     if ($create == true) {
         if (!is_dir($path)) {
             @mkdir($path, 0755, true);
         }
         if (!is_dir($path)) {
             throw new AJXP_Exception("Cannot create root path for repository (" . $this->repository->getDisplay() . "). Please check repository configuration or that your folder is writeable!");
         }
         if ($recycle != "" && !is_dir($path . "/" . $recycle)) {
             @mkdir($path . "/" . $recycle);
             if (!is_dir($path . "/" . $recycle)) {
                 throw new AJXP_Exception("Cannot create recycle bin folder. Please check repository configuration or that your folder is writeable!");
             } elseif (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
                 AJXP_Utils::winSetHidden($path . "/" . $recycle);
             }
         }
         $dataTemplate = $this->repository->getOption("DATA_TEMPLATE");
         if (!empty($dataTemplate) && is_dir($dataTemplate) && !is_file($path . "/.ajxp_template")) {
             $errs = array();
             $succ = array();
             $repoData = array('base_url' => $this->urlBase, 'wrapper_name' => $this->wrapperClassName, 'chmod' => $chmod, 'recycle' => $recycle);
             $this->dircopy($dataTemplate, $path, $succ, $errs, false, false, $repoData, $repoData);
             touch($path . "/.ajxp_template");
         }
     } else {
         if (!is_dir($path)) {
             throw new AJXP_Exception("Cannot find base path for your repository! Please check the configuration!");
         }
     }
     if ($recycle != "") {
         RecycleBinManager::init($this->urlBase, "/" . $recycle);
     }
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:50,代码来源:class.fsAccessDriver.php

示例3: initRepository

 /**
  * initRepository
  */
 public function initRepository()
 {
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     ConfService::setConf("PROBE_REAL_SIZE", false);
     require_once $this->getBaseDir() . "/SFTPPSL_StreamWrapper.php";
     $create = $this->repository->getOption("CREATE");
     $path = $this->repository->getOption("PATH");
     $wrapperData = $this->detectStreamWrapper(true);
     $this->wrapperClassName = $wrapperData["classname"];
     $this->urlBase = $wrapperData["protocol"] . "://" . $this->repository->getId();
 }
开发者ID:rmxcc,项目名称:pydio-core,代码行数:18,代码来源:class.sftpPSLAccessDriver.php

示例4: initRepository

 public function initRepository()
 {
     $wrapperData = $this->detectStreamWrapper(true);
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     $recycle = $this->repository->getOption("RECYCLE_BIN");
     ConfService::setConf("PROBE_REAL_SIZE", false);
     $this->wrapperClassName = $wrapperData["classname"];
     $this->urlBase = $wrapperData["protocol"] . "://" . $this->repository->getId();
     if ($recycle != "") {
         RecycleBinManager::init($this->urlBase, "/" . $recycle);
     }
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:16,代码来源:class.s3AccessDriver.php

示例5: initRepository

 public function initRepository()
 {
     @(include_once "HTTP/WebDAV/Client.php");
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     if (!class_exists('HTTP_WebDAV_Client_Stream')) {
         throw new Exception("You must have Pear HTTP/WebDAV/Client package installed to use this access driver!");
     }
     $create = $this->repository->getOption("CREATE");
     $path = $this->repository->getOption("PATH");
     $recycle = $this->repository->getOption("RECYCLE_BIN");
     ConfService::setConf("PROBE_REAL_SIZE", false);
     /*
     if ($create == true) {
         if(!is_dir($path)) @mkdir($path);
         if (!is_dir($path)) {
             throw new AJXP_Exception("Cannot create root path for repository (".$this->repository->getDisplay()."). Please check repository configuration or that your folder is writeable!");
         }
         if ($recycle!= "" && !is_dir($path."/".$recycle)) {
             @mkdir($path."/".$recycle);
             if (!is_dir($path."/".$recycle)) {
                 throw new AJXP_Exception("Cannot create recycle bin folder. Please check repository configuration or that your folder is writeable!");
             }
         }
     } else {
         if (!is_dir($path)) {
             throw new AJXP_Exception("Cannot find base path ($path) for your repository! Please check the configuration!");
         }
     }
     */
     $wrapperData = $this->detectStreamWrapper(true);
     $this->wrapperClassName = $wrapperData["classname"];
     $this->urlBase = $wrapperData["protocol"] . "://" . $this->repository->getId();
     if (!is_dir($this->urlBase)) {
         if (webdavAccessWrapper::$lastException) {
             throw webdavAccessWrapper::$lastException;
         }
         throw new AJXP_Exception("Cannot connect to the WebDAV server ({$path}). Please check the configuration!");
     }
     if ($recycle != "") {
         RecycleBinManager::init($this->urlBase, "/" . $recycle);
     }
 }
开发者ID:biggtfish,项目名称:cms,代码行数:46,代码来源:class.webdavAccessDriver.php

示例6: initRepository

 function initRepository()
 {
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     if (isset($this->pluginConf["PROBE_REAL_SIZE"])) {
         // PASS IT TO THE WRAPPER
         ConfService::setConf("PROBE_REAL_SIZE", $this->pluginConf["PROBE_REAL_SIZE"]);
     }
     $create = $this->repository->getOption("CREATE");
     $path = $this->repository->getOption("PATH");
     $recycle = $this->repository->getOption("RECYCLE_BIN");
     if ($create == true) {
         if (!is_dir($path)) {
             @mkdir($path, 0755, true);
         }
         if (!is_dir($path)) {
             throw new AJXP_Exception("Cannot create root path for repository (" . $this->repository->getDisplay() . "). Please check repository configuration or that your folder is writeable!");
         }
         if ($recycle != "" && !is_dir($path . "/" . $recycle)) {
             @mkdir($path . "/" . $recycle);
             if (!is_dir($path . "/" . $recycle)) {
                 throw new AJXP_Exception("Cannot create recycle bin folder. Please check repository configuration or that your folder is writeable!");
             }
         }
         $dataTemplate = $this->repository->getOption("DATA_TEMPLATE");
         if (!empty($dataTemplate) && is_dir($dataTemplate) && !is_file($path . "/.ajxp_template")) {
             $errs = array();
             $succ = array();
             $this->dircopy($dataTemplate, $path, $succ, $errs, false, false);
             touch($path . "/.ajxp_template");
         }
     } else {
         if (!is_dir($path)) {
             throw new AJXP_Exception("Cannot find base path for your repository! Please check the configuration!");
         }
     }
     $wrapperData = $this->detectStreamWrapper(true);
     $this->wrapperClassName = $wrapperData["classname"];
     $this->urlBase = $wrapperData["protocol"] . "://" . $this->repository->getId();
     if ($recycle != "") {
         RecycleBinManager::init($this->urlBase, "/" . $recycle);
     }
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:46,代码来源:class.fsAccessDriver.php

示例7: initRepository

 public function initRepository()
 {
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     require_once $this->getBaseDir() . "/openstack-sdk-php/vendor/autoload.php";
     Bootstrap::useStreamWrappers();
     Bootstrap::setConfiguration(array('username' => $this->repository->getOption("USERNAME"), 'password' => $this->repository->getOption("PASSWORD"), 'tenantid' => $this->repository->getOption("TENANT_ID"), 'endpoint' => $this->repository->getOption("ENDPOINT"), 'openstack.swift.region' => $this->repository->getOption("REGION"), 'transport.ssl.verify' => false));
     $path = $this->repository->getOption("PATH");
     $recycle = $this->repository->getOption("RECYCLE_BIN");
     ConfService::setConf("PROBE_REAL_SIZE", false);
     $this->detectStreamWrapper(true);
     $this->urlBase = "pydio://" . $this->repository->getId();
     if ($recycle != "") {
         RecycleBinManager::init($this->urlBase, "/" . $recycle);
     }
 }
开发者ID:thermalpaste,项目名称:pydio-core,代码行数:19,代码来源:class.swiftAccessDriver.php

示例8: initRepository

 public function initRepository()
 {
     require_once $this->getBaseDir() . "/aS3StreamWrapper/lib/wrapper/aS3StreamWrapper.class.php";
     if (!in_array("s3", stream_get_wrappers())) {
         $wrapper = new aS3StreamWrapper();
         $wrapper->register(array('protocol' => 's3', 'acl' => AmazonS3::ACL_OWNER_FULL_CONTROL, 'key' => $this->repository->getOption("API_KEY"), 'secretKey' => $this->repository->getOption("SECRET_KEY"), 'region' => $this->repository->getOption("REGION")));
     }
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     $path = $this->repository->getOption("PATH");
     $recycle = $this->repository->getOption("RECYCLE_BIN");
     ConfService::setConf("PROBE_REAL_SIZE", false);
     $wrapperData = $this->detectStreamWrapper(true);
     $this->wrapperClassName = $wrapperData["classname"];
     $this->urlBase = $wrapperData["protocol"] . "://" . $this->repository->getId();
     if ($recycle != "") {
         RecycleBinManager::init($this->urlBase, "/" . $recycle);
     }
 }
开发者ID:biggtfish,项目名称:cms,代码行数:22,代码来源:class.s3AccessDriver.php

示例9: initRepository

 function initRepository()
 {
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     if (!function_exists('ssh2_connect')) {
         throw new Exception("You must have the php ssh2 extension active!");
     }
     ConfService::setConf("PROBE_REAL_SIZE", false);
     $path = $this->repository->getOption("PATH");
     $recycle = $this->repository->getOption("RECYCLE_BIN");
     $wrapperData = $this->detectStreamWrapper(true);
     $this->wrapperClassName = $wrapperData["classname"];
     $this->urlBase = $wrapperData["protocol"] . "://" . $this->repository->getId();
     if (!file_exists($this->urlBase)) {
         throw new AJXP_Exception("Cannot find base path ({$path}) for your repository! Please check the configuration!");
     }
     if ($recycle != "") {
         RecycleBinManager::init($this->urlBase, "/" . $recycle);
     }
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:23,代码来源:class.sftpAccessDriver.php

示例10: initRepository

 public function initRepository()
 {
     $this->detectStreamWrapper(true);
     if (is_array($this->pluginConf)) {
         $this->driverConf = $this->pluginConf;
     } else {
         $this->driverConf = array();
     }
     $recycle = $this->repository->getOption("RECYCLE_BIN");
     ConfService::setConf("PROBE_REAL_SIZE", false);
     $this->urlBase = "pydio://" . $this->repository->getId();
     if ($recycle != "" && !is_dir($this->urlBase . "/" . $recycle . "/")) {
         @mkdir($this->urlBase . "/" . $recycle . "/", 0777, true);
         if (!is_dir($this->urlBase . "/" . $recycle . "/")) {
             throw new AJXP_Exception("Cannot create recycle bin folder. Please check repository configuration or that your folder is writeable!");
         } else {
             $this->setHiddenAttribute(new AJXP_Node($this->urlBase . "/" . $recycle . "/"));
         }
     }
     if ($recycle != "") {
         RecycleBinManager::init($this->urlBase, "/" . $recycle);
     }
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:23,代码来源:class.s3AccessDriver.php

示例11: parseApplicationGetParameters

 /**
  * Utilitary to pass some parameters directly at startup :
  * + repository_id / folder
  * + compile & skipDebug
  * + update_i18n, extract, create
  * + external_selector_type
  * + skipIOS
  * + gui
  * @static
  * @param $parameters
  * @param $output
  * @param $session
  * @return void
  */
 public static function parseApplicationGetParameters($parameters, &$output, &$session)
 {
     $output["EXT_REP"] = "/";
     if (isset($parameters["repository_id"]) && isset($parameters["folder"]) || isset($parameters["goto"])) {
         if (isset($parameters["goto"])) {
             $explode = explode("/", ltrim($parameters["goto"], "/"));
             $repoId = array_shift($explode);
             $parameters["folder"] = str_replace($repoId, "", ltrim($parameters["goto"], "/"));
         } else {
             $repoId = $parameters["repository_id"];
         }
         $repository = ConfService::getRepositoryById($repoId);
         if ($repository == null) {
             $repository = ConfService::getRepositoryByAlias($repoId);
             if ($repository != null) {
                 $parameters["repository_id"] = $repository->getId();
             }
         } else {
             $parameters["repository_id"] = $repository->getId();
         }
         require_once AJXP_BIN_FOLDER . "/class.SystemTextEncoding.php";
         if (AuthService::usersEnabled()) {
             $loggedUser = AuthService::getLoggedUser();
             if ($loggedUser != null && $loggedUser->canSwitchTo($parameters["repository_id"])) {
                 $output["FORCE_REGISTRY_RELOAD"] = true;
                 $output["EXT_REP"] = SystemTextEncoding::toUTF8(urldecode($parameters["folder"]));
                 $loggedUser->setArrayPref("history", "last_repository", $parameters["repository_id"]);
                 $loggedUser->setPref("pending_folder", SystemTextEncoding::toUTF8(AJXP_Utils::decodeSecureMagic($parameters["folder"])));
                 $loggedUser->save("user");
                 AuthService::updateUser($loggedUser);
             } else {
                 $session["PENDING_REPOSITORY_ID"] = $parameters["repository_id"];
                 $session["PENDING_FOLDER"] = SystemTextEncoding::toUTF8(AJXP_Utils::decodeSecureMagic($parameters["folder"]));
             }
         } else {
             ConfService::switchRootDir($parameters["repository_id"]);
             $output["EXT_REP"] = SystemTextEncoding::toUTF8(urldecode($parameters["folder"]));
         }
     }
     if (isset($parameters["skipDebug"])) {
         ConfService::setConf("JS_DEBUG", false);
     }
     if (ConfService::getConf("JS_DEBUG") && isset($parameters["compile"])) {
         require_once AJXP_BIN_FOLDER . "/class.AJXP_JSPacker.php";
         AJXP_JSPacker::pack();
     }
     if (ConfService::getConf("JS_DEBUG") && isset($parameters["update_i18n"])) {
         if (isset($parameters["extract"])) {
             self::extractConfStringsFromManifests();
         }
         self::updateAllI18nLibraries(isset($parameters["create"]) ? $parameters["create"] : "");
     }
     if (ConfService::getConf("JS_DEBUG") && isset($parameters["clear_plugins_cache"])) {
         @unlink(AJXP_PLUGINS_CACHE_FILE);
         @unlink(AJXP_PLUGINS_REQUIRES_FILE);
     }
     if (AJXP_SERVER_DEBUG && isset($parameters["extract_application_hooks"])) {
         self::extractHooksToDoc();
     }
     if (isset($parameters["external_selector_type"])) {
         $output["SELECTOR_DATA"] = array("type" => $parameters["external_selector_type"], "data" => $parameters);
     }
     if (isset($parameters["skipIOS"])) {
         setcookie("SKIP_IOS", "true");
     }
     if (isset($parameters["skipANDROID"])) {
         setcookie("SKIP_ANDROID", "true");
     }
     if (isset($parameters["gui"])) {
         setcookie("AJXP_GUI", $parameters["gui"]);
         if ($parameters["gui"] == "light") {
             $session["USE_EXISTING_TOKEN_IF_EXISTS"] = true;
         }
     } else {
         if (isset($session["USE_EXISTING_TOKEN_IF_EXISTS"])) {
             unset($session["USE_EXISTING_TOKEN_IF_EXISTS"]);
         }
         setcookie("AJXP_GUI", null);
     }
     if (isset($session["OVERRIDE_GUI_START_PARAMETERS"])) {
         $output = array_merge($output, $session["OVERRIDE_GUI_START_PARAMETERS"]);
     }
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:97,代码来源:class.AJXP_Utils.php

示例12: parseApplicationGetParameters

 public static function parseApplicationGetParameters($parameters, &$output, &$session)
 {
     $output["EXT_REP"] = "/";
     if (isset($parameters["repository_id"]) && isset($parameters["folder"])) {
         require_once "server/classes/class.SystemTextEncoding.php";
         if (AuthService::usersEnabled()) {
             $loggedUser = AuthService::getLoggedUser();
             if ($loggedUser != null && $loggedUser->canSwitchTo($parameters["repository_id"])) {
                 $output["EXT_REP"] = SystemTextEncoding::toUTF8(urldecode($parameters["folder"]));
                 $loggedUser->setArrayPref("history", "last_repository", $parameters["repository_id"]);
                 $loggedUser->setPref("pending_folder", AJXP_Utils::decodeSecureMagic($parameters["folder"]));
                 $loggedUser->save();
                 AuthService::updateUser($loggedUser);
             } else {
                 $session["PENDING_REPOSITORY_ID"] = $parameters["repository_id"];
                 $session["PENDING_FOLDER"] = AJXP_Utils::decodeSecureMagic($parameters["folder"]);
             }
         } else {
             ConfService::switchRootDir($parameters["repository_id"]);
             $output["EXT_REP"] = SystemTextEncoding::toUTF8(urldecode($parameters["folder"]));
         }
     }
     if (isset($parameters["skipDebug"])) {
         ConfService::setConf("JS_DEBUG", false);
     }
     if (ConfService::getConf("JS_DEBUG") && isset($parameters["compile"])) {
         require_once SERVER_RESOURCES_FOLDER . "/class.AJXP_JSPacker.php";
         AJXP_JSPacker::pack();
     }
     if (ConfService::getConf("JS_DEBUG") && isset($parameters["update_i18n"])) {
         AJXP_Utils::updateI18nFiles(isset($parameters["plugin_path"]) ? $parameters["plugin_path"] : "");
     }
     if (isset($parameters["external_selector_type"])) {
         $output["SELECTOR_DATA"] = array("type" => $parameters["external_selector_type"], "data" => $parameters);
     }
 }
开发者ID:pussbb,项目名称:CI_DEV_CMS,代码行数:36,代码来源:class.AJXP_Utils.php


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