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


PHP AJXP_Utils::loadSerialFile方法代码示例

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


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

示例1: loadChannel

 public function loadChannel($channelName, $create = false)
 {
     if (isset($this->channels) && is_array($this->channels[$channelName])) {
         return;
     }
     if (is_file($this->getPluginWorkDir() . "/queues/channel-{$channelName}")) {
         if (!isset($this->channels)) {
             $this->channels = array();
         }
         $data = AJXP_Utils::loadSerialFile($this->getPluginWorkDir() . "/queues/channel-{$channelName}");
         if (is_array($data)) {
             if (!is_array($data["MESSAGES"])) {
                 $data["MESSAGES"] = array();
             }
             if (!is_array($data["CLIENTS"])) {
                 $data["CLIENTS"] = array();
             }
             $this->channels[$channelName] = $data;
             return;
         }
     }
     if ($create) {
         if (!isset($this->channels)) {
             $this->channels = array();
         }
         $this->channels[$channelName] = array("CLIENTS" => array(), "MESSAGES" => array());
     }
 }
开发者ID:thermalpaste,项目名称:pydio-core,代码行数:28,代码来源:class.AJXP_SqlMessageExchanger.php

示例2: loadCounters

 private static function loadCounters()
 {
     if (!isset(self::$counters)) {
         self::$counters = AJXP_Utils::loadSerialFile(ConfService::getCoreConf("PUBLIC_DOWNLOAD_FOLDER") . "/.ajxp_publiclet_counters.ser");
     }
     return self::$counters;
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:7,代码来源:class.PublicletCounter.php

示例3: listUsers

 function listUsers()
 {
     $users = AJXP_Utils::loadSerialFile($this->usersSerFile);
     if (AuthService::ignoreUserCase()) {
         $users = array_combine(array_map("strtolower", array_keys($users)), array_values($users));
     }
     return $users;
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:8,代码来源:class.serialAuthDriver.php

示例4: listUsers

 public function listUsers($baseGroup = "/")
 {
     $users = AJXP_Utils::loadSerialFile($this->usersSerFile);
     if (AuthService::ignoreUserCase()) {
         $users = array_combine(array_map("strtolower", array_keys($users)), array_values($users));
     }
     ConfService::getConfStorageImpl()->filterUsersByGroup($users, $baseGroup, false);
     return $users;
 }
开发者ID:rmxcc,项目名称:pydio-core,代码行数:9,代码来源:class.serial_otpAuthDriver.php

示例5: init

 /**
  * Initialize the driver.
  *
  * Gives the driver a chance to set up it's connection / file resource etc..
  *
  * @param Array $options array of options specific to the logger driver.
  * @access public
  */
 public function init($options)
 {
     parent::init($options);
     $this->sqlDriver = AJXP_Utils::cleanDibiDriverParameters($options["SQL_DRIVER"]);
     try {
         dibi::connect($this->sqlDriver);
     } catch (DibiException $e) {
         echo get_class($e), ': ', $e->getMessage(), "\n";
         exit(1);
     }
     $this->queries = AJXP_Utils::loadSerialFile($this->getBaseDir() . "/queries.json", false, "json");
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:20,代码来源:class.sqlLogDriver.php

示例6: listUsers

 public function listUsers()
 {
     //Remote user list for admins.
     if ($this->isAdmin()) {
         $users = $this->getRemoteUsers();
         AJXP_Utils::saveSerialFile($this->usersSerFile, $users);
     } else {
         $users = AJXP_Utils::loadSerialFile($this->usersSerFile);
     }
     if (AuthService::ignoreUserCase()) {
         $users = array_combine(array_map("strtolower", array_keys($users)), array_values($users));
     }
     ksort($users);
     return $users;
 }
开发者ID:Beanow,项目名称:auth.gitlab,代码行数:15,代码来源:class.gitlabAuthDriver.php

示例7: getTemporaryData

 /**
  * Get Temporary Data.
  * Implementation uses serialised files because of the overhead incurred with a full db implementation.
  * 
  * @param $key String key of data to retrieve
  * @return Requested value
  */
 function getTemporaryData($key)
 {
     $dirPath = $this->storage->getOption("USERS_DIRPATH");
     if ($dirPath == "") {
         $dirPath = AJXP_INSTALL_PATH . "/data/users";
         AJXP_Logger::logAction("getTemporaryData", array("Warning" => "The conf.sql driver is missing a mandatory option USERS_DIRPATH!"));
     }
     return AJXP_Utils::loadSerialFile($dirPath . "/" . $this->getId() . "-temp-" . $key . ".ser");
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:16,代码来源:class.AJXP_User.php

示例8: getTemporaryData

 public function getTemporaryData($key)
 {
     $fastCheck = $this->storage->getOption("FAST_CHECKS");
     $fastCheck = $fastCheck == "true" || $fastCheck == true;
     return AJXP_Utils::loadSerialFile($this->getStoragePath() . "/" . $key . ".ser", $fastCheck);
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:6,代码来源:class.AJXP_SerialUser.php

示例9: updateAliasesIndex

 /**
  * Serial specific method : indexes repositories by slugs, for better performances
  */
 function updateAliasesIndex($repositoryId, $repositorySlug)
 {
     $data = AJXP_Utils::loadSerialFile($this->aliasesIndexFile);
     $byId = array_flip($data);
     $byId[$repositoryId] = $repositorySlug;
     AJXP_Utils::saveSerialFile($this->aliasesIndexFile, array_flip($byId));
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:10,代码来源:class.serialConfDriver.php

示例10: listUsers

 public function listUsers($baseGroup = "/", $recursive = true)
 {
     $users = AJXP_Utils::loadSerialFile($this->usersSerFile);
     if (AuthService::ignoreUserCase()) {
         $users = array_combine(array_map("strtolower", array_keys($users)), array_values($users));
     }
     ksort($users);
     return $users;
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:9,代码来源:class.remoteAuthDriver.php

示例11: getTemporaryData

 /**
  * Get Temporary Data.
  * Implementation uses serialised files because of the overhead incurred with a full db implementation.
  *
  * @param $key String key of data to retrieve
  * @return Requested value
  */
 public function getTemporaryData($key)
 {
     $dirPath = $this->storage->getOption("USERS_DIRPATH");
     if ($dirPath == "") {
         $dirPath = AJXP_INSTALL_PATH . "/data/users";
         AJXP_Logger::info(__CLASS__, "getTemporaryData", array("Warning" => "The conf.sql driver is missing a mandatory option USERS_DIRPATH!"));
     }
     $id = AuthService::ignoreUserCase() ? strtolower($this->getId()) : $this->getId();
     return AJXP_Utils::loadSerialFile($dirPath . "/" . $id . "/temp-" . $key . ".ser");
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:17,代码来源:class.AJXP_SqlUser.php

示例12: _savePluginConfig

 /**
  * @param String $pluginId
  * @param String $options
  */
 public function _savePluginConfig($pluginId, $options)
 {
     $jsonPath = $this->getPluginWorkDir(true) . "/bootstrap.json";
     $jsonData = AJXP_Utils::loadSerialFile($jsonPath, false, "json");
     if (!is_array($jsonData)) {
         $jsonData = array();
     }
     $jsonData[$pluginId] = $options;
     if ($pluginId == "core.conf" || $pluginId == "core.auth") {
         $testKey = $pluginId == "core.conf" ? "UNIQUE_INSTANCE_CONFIG" : "MASTER_INSTANCE_CONFIG";
         $current = array();
         $this->_loadPluginConfig($pluginId, $current);
         if (isset($current[$testKey]["instance_name"]) && $current[$testKey]["instance_name"] != $options[$testKey]["instance_name"]) {
             $forceDisconnexion = $pluginId;
         }
     }
     if (file_exists($jsonPath)) {
         copy($jsonPath, $jsonPath . ".bak");
     }
     AJXP_Utils::saveSerialFile($jsonPath, $jsonData, true, false, "json", true);
     if (isset($forceDisconnexion)) {
         if ($pluginId == "core.conf") {
             // DISCONNECT
             AuthService::disconnect();
         } else {
             if ($pluginId == "core.auth") {
                 // DELETE admin_counted file and DISCONNECT
                 @unlink(AJXP_CACHE_DIR . "/admin_counted");
             }
         }
     }
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:36,代码来源:class.BootConfLoader.php

示例13: listUsers

 function listUsers()
 {
     return AJXP_Utils::loadSerialFile($this->usersSerFile);
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:4,代码来源:class.remoteAuthDriver.php

示例14: getTemporaryData

 function getTemporaryData($key)
 {
     return AJXP_Utils::loadSerialFile($this->storage->getOption("USERS_DIRPATH") . "/" . $this->getId() . "/" . $key . ".ser");
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:4,代码来源:class.AJXP_User.php

示例15: groupExists

 /**
  * Check if group already exists
  * @param string $groupPath
  * @return boolean
  */
 public function groupExists($groupPath)
 {
     $groups = AJXP_Utils::loadSerialFile(AJXP_VarsFilter::filter($this->getOption("USERS_DIRPATH")) . "/groups.ser");
     $reverse = array_flip($groups);
     if (isset($reverse[$groupPath])) {
         return true;
     }
     return false;
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:14,代码来源:class.serialConfDriver.php


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