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


PHP AJXP_Plugin::loadManifest方法代码示例

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


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

示例1: loadPluginsRegistry

 public function loadPluginsRegistry($pluginFolder, $confFolder)
 {
     $this->pluginFolder = $pluginFolder;
     $this->confFolder = $confFolder;
     $handler = opendir($pluginFolder);
     $pluginsPool = array();
     if ($handler) {
         while (($item = readdir($handler)) !== false) {
             if ($item == "." || $item == ".." || !is_dir($pluginFolder . "/" . $item) || strstr($item, ".") === false) {
                 continue;
             }
             $plugin = new AJXP_Plugin($item, $pluginFolder . "/" . $item);
             $plugin->loadManifest();
             if ($plugin->manifestLoaded()) {
                 $pluginsPool[$plugin->getId()] = $plugin;
                 if (method_exists($plugin, "detectStreamWrapper")) {
                     if ($plugin->detectStreamWrapper(false) !== false) {
                         $this->streamWrapperPlugins[] = $plugin->getId();
                     }
                 }
             }
         }
         closedir($handler);
     }
     if (count($pluginsPool)) {
         $this->checkDependencies($pluginsPool);
         foreach ($pluginsPool as $plugin) {
             $this->recursiveLoadPlugin($plugin, $pluginsPool);
         }
     }
 }
开发者ID:BackupTheBerlios,项目名称:ascore,代码行数:31,代码来源:class.AJXP_PluginsService.php

示例2: loadPluginsRegistry

 public function loadPluginsRegistry($pluginFolder, $confFolder)
 {
     $this->pluginFolder = $pluginFolder;
     $this->confFolder = $confFolder;
     $handler = opendir($pluginFolder);
     $beforeSort = array();
     if ($handler) {
         while (($item = readdir($handler)) !== false) {
             if ($item == "." || $item == ".." || !is_dir($pluginFolder . "/" . $item) || strstr($item, ".") === false) {
                 continue;
             }
             $plugin = new AJXP_Plugin($item, $pluginFolder . "/" . $item);
             $plugin->loadManifest();
             if ($plugin->manifestLoaded()) {
                 $beforeSort[$plugin->getId()] = $plugin;
             }
         }
         closedir($handler);
     }
     if (count($beforeSort)) {
         $this->checkDependencies($beforeSort);
         $this->usort($beforeSort);
         foreach ($beforeSort as $plugin) {
             $plugType = $plugin->getType();
             if (!isset($this->registry[$plugType])) {
                 $this->registry[$plugType] = array();
             }
             $plugin = $this->instanciatePluginClass($plugin);
             if (is_file($this->confFolder . "/conf." . $plugin->getId() . ".inc")) {
                 $plugin->loadConfig($this->confFolder . "/conf." . $plugin->getId() . ".inc", "inc");
             }
             $this->registry[$plugType][$plugin->getName()] = $plugin;
         }
     }
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:35,代码来源:class.AJXP_PluginsService.php

示例3: softLoad

 /**
  * Simply load a plugin class, without the whole dependencies et.all
  * @param string $pluginId
  * @param array $pluginOptions
  * @return AJXP_Plugin
  */
 public function softLoad($pluginId, $pluginOptions)
 {
     // Try to get from cache
     list($type, $name) = explode(".", $pluginId);
     if (!empty($this->registry) && isset($this->registry[$type][$name])) {
         /**
          * @var AJXP_Plugin $plugin
          */
         $plugin = $this->registry[$type][$name];
         $plugin->init($pluginOptions);
         return clone $plugin;
     }
     $plugin = new AJXP_Plugin($pluginId, AJXP_INSTALL_PATH . "/" . AJXP_PLUGINS_FOLDER . "/" . $pluginId);
     $plugin->loadManifest();
     $plugin = $this->instanciatePluginClass($plugin);
     $plugin->loadConfigs(array());
     // Load default
     $plugin->init($pluginOptions);
     return $plugin;
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:26,代码来源:class.AJXP_PluginsService.php

示例4: softLoad

 /**
  * Simply load a plugin class, without the whole dependencies et.all
  * @param string $pluginId
  * @param array $pluginOptions
  * @return AJXP_Plugin
  */
 public function softLoad($pluginId, $pluginOptions)
 {
     $plugin = new AJXP_Plugin($pluginId, AJXP_INSTALL_PATH . "/" . AJXP_PLUGINS_FOLDER . "/" . $pluginId);
     $plugin->loadManifest();
     $plugin = $this->instanciatePluginClass($plugin);
     $plugin->init($pluginOptions);
     return $plugin;
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:14,代码来源:class.AJXP_PluginsService.php


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