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


PHP AJXP_PluginsService::getInstance方法代码示例

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


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

示例1: init

 public function init($options)
 {
     //parent::init($options);
     $this->options = $options;
     $this->driversDef = $this->getOption("DRIVERS");
     $this->masterSlaveMode = $this->getOption("MODE") == "MASTER_SLAVE";
     $this->masterName = $this->getOption("MASTER_DRIVER");
     $this->baseName = $this->getOption("USER_BASE_DRIVER");
     foreach ($this->driversDef as $def) {
         $name = $def["NAME"];
         $options = $def["OPTIONS"];
         $options["TRANSMIT_CLEAR_PASS"] = $this->options["TRANSMIT_CLEAR_PASS"];
         $options["LOGIN_REDIRECT"] = $this->options["LOGIN_REDIRECT"];
         $instance = AJXP_PluginsService::findPlugin("auth", $name);
         if (!is_object($instance)) {
             throw new Exception("Cannot find plugin {$name} for type 'auth'");
         }
         $instance->init($options);
         if ($name != $this->getOption("MASTER_DRIVER")) {
             $this->slaveName = $name;
         }
         $this->drivers[$name] = $instance;
     }
     if (!$this->masterSlaveMode) {
         // Enable Multiple choice login screen
         $multi = AJXP_PluginsService::getInstance()->findPluginById("authfront.multi");
         $multi->enabled = true;
         $multi->options = $this->options;
     }
     // THE "LOAD REGISTRY CONTRIBUTIONS" METHOD
     // WILL BE CALLED LATER, TO BE SURE THAT THE
     // SESSION IS ALREADY STARTED.
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:33,代码来源:class.multiAuthDriver.php

示例2: setUp

 protected function setUp()
 {
     $pServ = AJXP_PluginsService::getInstance();
     ConfService::init();
     $confPlugin = ConfService::getInstance()->confPluginSoftLoad($pServ);
     $pServ->loadPluginsRegistry(AJXP_INSTALL_PATH . "/plugins", $confPlugin);
     ConfService::start();
 }
开发者ID:thermalpaste,项目名称:pydio-core,代码行数:8,代码来源:CoreStorages.php

示例3: getConfImpl

 /**
  * @return AbstractConfDriver
  */
 public function getConfImpl()
 {
     if (!isset(self::$confImpl) || isset($this->pluginConf["UNIQUE_INSTANCE_CONFIG"]["instance_name"]) && self::$confImpl->getId() != $this->pluginConf["UNIQUE_INSTANCE_CONFIG"]["instance_name"]) {
         if (isset($this->pluginConf["UNIQUE_INSTANCE_CONFIG"])) {
             self::$confImpl = ConfService::instanciatePluginFromGlobalParams($this->pluginConf["UNIQUE_INSTANCE_CONFIG"], "AbstractConfDriver");
             AJXP_PluginsService::getInstance()->setPluginUniqueActiveForType("conf", self::$confImpl->getName());
         }
     }
     return self::$confImpl;
 }
开发者ID:thermalpaste,项目名称:pydio-core,代码行数:13,代码来源:class.CoreConfLoader.php

示例4: init

 public function init($options)
 {
     parent::init($options);
     self::$globalOptions = $this->pluginConf;
     $this->pluginInstance = ConfService::instanciatePluginFromGlobalParams($this->pluginConf["UNIQUE_PLUGIN_INSTANCE"], "AbstractLogDriver");
     if ($this->pluginInstance != false) {
         AJXP_PluginsService::getInstance()->setPluginUniqueActiveForType("log", $this->pluginInstance->getName(), $this->pluginInstance);
     }
     self::$loggerInstance = $this->pluginInstance;
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:10,代码来源:class.AJXP_Logger.php

示例5: initMeta

 public function initMeta($accessDriver)
 {
     parent::initMeta($accessDriver);
     $store = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("metastore");
     if ($store === false) {
         throw new Exception("The 'meta.simple_lock' plugin requires at least one active 'metastore' plugin");
     }
     $this->metaStore = $store;
     $this->metaStore->initMeta($accessDriver);
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:10,代码来源:class.FileHasher.php

示例6: initMeta

 public function initMeta($accessDriver)
 {
     parent::initMeta($accessDriver);
     $this->notificationCenter = AJXP_PluginsService::findPluginById("core.notifications");
     $store = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("metastore");
     if ($store === false) {
         throw new Exception("The 'meta.watch' plugin requires at least one active 'metastore' plugin");
     }
     $this->metaStore = $store;
     $this->metaStore->initMeta($accessDriver);
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:11,代码来源:class.MetaWatchRegister.php

示例7: processUserAccessPoint

 public function processUserAccessPoint($action, $httpVars, $fileVars)
 {
     switch ($action) {
         case "user_access_point":
             $uri = explode("/", trim($_SERVER["REQUEST_URI"], "/"));
             array_shift($uri);
             $action = array_shift($uri);
             $this->processSubAction($action, $uri);
             $_SESSION['OVERRIDE_GUI_START_PARAMETERS'] = array("REBASE" => "../../", "USER_GUI_ACTION" => $action);
             AJXP_Controller::findActionAndApply("get_boot_gui", array(), array());
             unset($_SESSION['OVERRIDE_GUI_START_PARAMETERS']);
             break;
         case "reset-password-ask":
             // This is a reset password request, generate a token and store it.
             // Find user by id
             if (AuthService::userExists($httpVars["email"])) {
                 // Send email
                 $userObject = ConfService::getConfStorageImpl()->createUserObject($httpVars["email"]);
                 $email = $userObject->personalRole->filterParameterValue("core.conf", "email", AJXP_REPO_SCOPE_ALL, "");
                 if (!empty($email)) {
                     $uuid = AJXP_Utils::generateRandomString(48);
                     ConfService::getConfStorageImpl()->saveTemporaryKey("password-reset", $uuid, AJXP_Utils::decodeSecureMagic($httpVars["email"]), array());
                     $mailer = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("mailer");
                     if ($mailer !== false) {
                         $mess = ConfService::getMessages();
                         $link = AJXP_Utils::detectServerURL() . "/user/reset-password/" . $uuid;
                         $mailer->sendMail(array($email), $mess["gui.user.1"], $mess["gui.user.7"] . "<a href=\"{$link}\">{$link}</a>");
                     } else {
                         echo 'ERROR: There is no mailer configured, please contact your administrator';
                     }
                 }
             }
             // Prune existing expired tokens
             ConfService::getConfStorageImpl()->pruneTemporaryKeys("password-reset", 20);
             echo "SUCCESS";
             break;
         case "reset-password":
             ConfService::getConfStorageImpl()->pruneTemporaryKeys("password-reset", 20);
             // This is a reset password
             if (isset($httpVars["key"]) && isset($httpVars["user_id"])) {
                 $key = ConfService::getConfStorageImpl()->loadTemporaryKey("password-reset", $httpVars["key"]);
                 if ($key != null && $key["user_id"] == $httpVars["user_id"] && AuthService::userExists($key["user_id"])) {
                     AuthService::updatePassword($key["user_id"], $httpVars["new_pass"]);
                 }
                 ConfService::getConfStorageImpl()->deleteTemporaryKey("password-reset", $httpVars["key"]);
             }
             AuthService::disconnect();
             echo 'SUCCESS';
             break;
         default:
             break;
     }
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:53,代码来源:class.UserGuiController.php

示例8: updateMetaShort

 protected function updateMetaShort($file, $shortUrl)
 {
     $metaStore = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("metastore");
     if ($metaStore !== false) {
         $driver = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("access");
         $metaStore->initMeta($driver);
         $streamData = $driver->detectStreamWrapper(false);
         $baseUrl = $streamData["protocol"] . "://" . ConfService::getRepository()->getId();
         $node = new AJXP_Node($baseUrl . $file);
         $metadata = $metaStore->retrieveMetadata($node, "ajxp_shared", true, AJXP_METADATA_SCOPE_REPOSITORY);
         $metadata["short_form_url"] = $shortUrl;
         $metaStore->setMetadata($node, "ajxp_shared", $metadata, true, AJXP_METADATA_SCOPE_REPOSITORY);
     }
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:14,代码来源:class.BitlyShortener.php

示例9: pack

 /**
  * Static function for packing all js and css into big files
  * Auto detect /js/*_list.txt files and /css/*_list.txt files and pack them.
  */
 function pack()
 {
     // Make sure that the gui.* plugin is loaded
     $plug = AJXP_PluginsService::getInstance()->getPluginsByType("gui");
     $sList = glob(CLIENT_RESOURCES_FOLDER . "/js/*_list.txt");
     foreach ($sList as $list) {
         $scriptName = str_replace("_list.txt", ".js", $list);
         AJXP_JSPacker::concatListAndPack($list, $scriptName, "Normal");
     }
     $sList = glob(AJXP_THEME_FOLDER . "/css/*_list.txt");
     foreach ($sList as $list) {
         $scriptName = str_replace("_list.txt", ".css", $list);
         AJXP_JSPacker::concatListAndPack($list, $scriptName, "None");
     }
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:19,代码来源:class.AJXP_JSPacker.php

示例10: getCacheImpl

 public function getCacheImpl()
 {
     $pluginInstance = null;
     if (!isset(self::$cacheInstance) || isset($this->pluginConf["UNIQUE_INSTANCE_CONFIG"]["instance_name"]) && self::$cacheInstance->getId() != $this->pluginConf["UNIQUE_INSTANCE_CONFIG"]["instance_name"]) {
         if (isset($this->pluginConf["UNIQUE_INSTANCE_CONFIG"])) {
             $pluginInstance = ConfService::instanciatePluginFromGlobalParams($this->pluginConf["UNIQUE_INSTANCE_CONFIG"], "AbstractCacheDriver");
             if ($pluginInstance != false) {
                 AJXP_PluginsService::getInstance()->setPluginUniqueActiveForType("cache", $pluginInstance->getName(), $pluginInstance);
             }
         }
         self::$cacheInstance = $pluginInstance;
         if ($pluginInstance !== null && is_a($pluginInstance, "AbstractCacheDriver") && $pluginInstance->supportsPatternDelete(AJXP_CACHE_SERVICE_NS_NODES)) {
             AJXP_MetaStreamWrapper::appendMetaWrapper("pydio.cache", "CacheStreamLayer");
         }
     }
     return self::$cacheInstance;
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:17,代码来源:class.CoreCacheLoader.php

示例11: getChildren

 public function getChildren()
 {
     $this->children = array();
     $u = AuthService::getLoggedUser();
     if ($u != null) {
         $repos = ConfService::getAccessibleRepositories($u);
         // Refilter to make sure the driver is an AjxpWebdavProvider
         foreach ($repos as $repository) {
             $accessType = $repository->getAccessType();
             $driver = AJXP_PluginsService::getInstance()->getPluginByTypeName("access", $accessType);
             if (is_a($driver, "AjxpWrapperProvider") && $repository->getOption("AJXP_WEBDAV_DISABLED") !== true) {
                 $this->children[$repository->getSlug()] = new Sabre\DAV\SimpleCollection($repository->getSlug());
             }
         }
     }
     return $this->children;
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:17,代码来源:class.AJXP_Sabre_RootCollection.php

示例12: switchAction

 public function switchAction($actionName, $httpVars, $fileVars)
 {
     if ($actionName == "search-cart-download") {
         // Pipe SEARCH + DOWNLOAD actions.
         $indexer = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("index");
         if ($indexer == false) {
             return;
         }
         $httpVars["return_selection"] = true;
         unset($httpVars["get_action"]);
         $res = AJXP_Controller::findActionAndApply("search", $httpVars, $fileVars);
         if (isset($res) && is_array($res)) {
             $newHttpVars = array("selection_nodes" => $res, "dir" => "__AJXP_ZIP_FLAT__/", "archive_name" => $httpVars["archive_name"]);
             AJXP_Controller::findActionAndApply("download", $newHttpVars, array());
         }
     }
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:17,代码来源:class.CartManager.php

示例13: updateMetaShort

 protected function updateMetaShort($file, $elementId, $shortUrl)
 {
     $driver = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("access");
     $streamData = $driver->detectStreamWrapper(false);
     $baseUrl = $streamData["protocol"] . "://" . ConfService::getRepository()->getId();
     $node = new AJXP_Node($baseUrl . $file);
     if ($node->hasMetaStore()) {
         $metadata = $node->retrieveMetadata("ajxp_shared", true, AJXP_METADATA_SCOPE_REPOSITORY);
         if ($elementId != -1) {
             if (!is_array($metadata["element"][$elementId])) {
                 $metadata["element"][$elementId] = array();
             }
             $metadata["element"][$elementId]["short_form_url"] = $shortUrl;
         } else {
             $metadata['short_form_url'] = $shortUrl;
         }
         $node->setMetadata("ajxp_shared", $metadata, true, AJXP_METADATA_SCOPE_REPOSITORY);
     }
 }
开发者ID:biggtfish,项目名称:cms,代码行数:19,代码来源:class.BitlyShortener.php

示例14: init

 public function init($options)
 {
     parent::init($options);
     // Load all enabled frontend plugins
     $fronts = AJXP_PluginsService::getInstance()->getPluginsByType("authfront");
     usort($fronts, array($this, "frontendsSort"));
     foreach ($fronts as $front) {
         if ($front->isEnabled()) {
             $configs = $front->getConfigs();
             $protocol = $configs["PROTOCOL_TYPE"];
             if ($protocol == "session_only" && !AuthService::$useSession) {
                 continue;
             }
             if ($protocol == "no_session" && AuthService::$useSession) {
                 continue;
             }
             AJXP_PluginsService::setPluginActive($front->getType(), $front->getName(), true);
         }
     }
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:20,代码来源:class.FrontendsLoader.php

示例15: orbitExtensionActive

 private function orbitExtensionActive()
 {
     $confs = ConfService::getConfStorageImpl()->loadPluginConfig("gui", "ajax");
     if (!isset($confs) || !isset($confs["GUI_THEME"])) {
         $confs["GUI_THEME"] = "orbit";
     }
     if ($confs["GUI_THEME"] == "orbit") {
         $pServ = AJXP_PluginsService::getInstance();
         $activePlugs = $pServ->getActivePlugins();
         $streamWrappers = $pServ->getStreamWrapperPlugins();
         $streamActive = false;
         foreach ($streamWrappers as $sW) {
             if (array_key_exists($sW, $activePlugs) && $activePlugs[$sW] === true) {
                 $streamActive = true;
                 break;
             }
         }
         return $streamActive;
     }
     return false;
 }
开发者ID:thermalpaste,项目名称:pydio-core,代码行数:21,代码来源:class.MobileGuiPlugin.php


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