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


PHP AJXP_Plugin::init方法代码示例

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


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

示例1: initMeta

    public function initMeta($accessDriver)
    {
        $this->accessDriver = $accessDriver;
        if (!function_exists("exif_read_data")) {
            return;
        }
        $messages = ConfService::getMessages();
        $def = $this->getMetaDefinition();
        if (!count($def)) {
            return;
        }
        $cdataHead = '<div>
						<div class="panelHeader infoPanelGroup" colspan="2">' . $messages["meta.exif.1"] . '</div>
						<table class="infoPanelTable" cellspacing="0" border="0" cellpadding="0">';
        $cdataFoot = '</table></div>';
        $cdataParts = "";
        foreach ($def as $key => $label) {
            $trClass = $even ? " class=\"even\"" : "";
            $even = !$even;
            $cdataParts .= '<tr' . $trClass . '><td class="infoPanelLabel">' . $label . '</td><td class="infoPanelValue" id="ip_' . $key . '">#{' . $key . '}</td></tr>';
        }
        $selection = $this->xPath->query('registry_contributions/client_configs/component_config[@className="InfoPanel"]/infoPanelExtension');
        $contrib = $selection->item(0);
        $contrib->setAttribute("attributes", implode(",", array_keys($def)));
        $contrib->setAttribute("modifier", "ExifCellRenderer.prototype.infoPanelModifier");
        $htmlSel = $this->xPath->query('html', $contrib);
        $html = $htmlSel->item(0);
        $cdata = $this->manifestDoc->createCDATASection($cdataHead . $cdataParts . $cdataFoot);
        $html->appendChild($cdata);
        parent::init($this->options);
    }
开发者ID:firstcoder55,项目名称:Webkey,代码行数:31,代码来源:class.ExifMetaManager.php

示例2: init

 function init($options)
 {
     parent::init($options);
     $pServ = AJXP_PluginsService::getInstance();
     $aPlugs = $pServ->getActivePlugins();
     $accessPlugs = $pServ->getPluginsByType("access");
     $this->repository = ConfService::getRepository();
     foreach ($accessPlugs as $pId => $plug) {
         if (array_key_exists("access." . $pId, $aPlugs) && $aPlugs["access." . $pId] === true) {
             $this->accessDriver = $plug;
             if (!isset($this->accessDriver->repository)) {
                 $this->accessDriver->init($this->repository);
                 $this->accessDriver->initRepository();
                 $wrapperData = $this->accessDriver->detectStreamWrapper(true);
             } else {
                 $wrapperData = $this->accessDriver->detectStreamWrapper(false);
             }
             $this->urlBase = $wrapperData["protocol"] . "://" . $this->repository->getId();
         }
     }
     $this->metaStore = AJXP_PluginsService::getInstance()->getUniqueActivePluginForType("metastore");
     if ($this->metaStore !== false) {
         $this->metaStore->initMeta($this->accessDriver);
     }
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:25,代码来源:class.ShareCenter.php

示例3: init

 public function init($options)
 {
     parent::init($options);
     $this->useQueue = $this->pluginConf["USE_QUEUE"];
     try {
         $this->msgExchanger = ConfService::instanciatePluginFromGlobalParams($this->pluginConf["UNIQUE_MS_INSTANCE"], "AJXP_MessageExchanger");
     } catch (Exception $e) {
     }
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:9,代码来源:class.MqManager.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: init

 public function init($options)
 {
     parent::init($options);
     $u = AuthService::getLoggedUser();
     if ($u == null) {
         return;
     }
     if ($u->getGroupPath() != "/") {
         $this->enabled = false;
     }
 }
开发者ID:rbrdevs,项目名称:pydio-core,代码行数:11,代码来源:class.AjxpScheduler.php

示例6: init

 public function init($options)
 {
     parent::init($options);
     $this->userId = AuthService::getLoggedUser() !== null ? AuthService::getLoggedUser()->getId() : "shared";
     try {
         $this->eventStore = ConfService::instanciatePluginFromGlobalParams($this->pluginConf["UNIQUE_FEED_INSTANCE"], "AJXP_FeedStore");
     } catch (Exception $e) {
     }
     if ($this->eventStore === false) {
         $this->pluginConf["USER_EVENTS"] = false;
     }
 }
开发者ID:projectesIF,项目名称:Ateneu,代码行数:12,代码来源:class.AJXP_NotificationCenter.php

示例7: init

 public function init($options)
 {
     parent::init($options);
     if (AJXP_SERVER_DEBUG) {
         $this->mailCache = $this->getPluginWorkDir(true) . "/mailbox";
     }
     $pConf = $this->pluginConf["UNIQUE_MAILER_INSTANCE"];
     if (!empty($pConf)) {
         $p = ConfService::instanciatePluginFromGlobalParams($pConf, "AjxpMailer");
         AJXP_PluginsService::getInstance()->setPluginUniqueActiveForType($p->getType(), $p->getName(), $p);
     }
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:12,代码来源:class.AjxpMailer.php

示例8: init

 /**
  * AJXP_Plugin initializer
  * @param array $options
  */
 public function init($options)
 {
     parent::init($options);
     $this->repository = ConfService::getRepository();
     if (!is_a($this->repository->driverInstance, "AjxpWrapperProvider")) {
         return;
     }
     $this->accessDriver = $this->repository->driverInstance;
     $this->urlBase = "pydio://" . $this->repository->getId();
     if (array_key_exists("meta.watch", AJXP_PluginsService::getInstance()->getActivePlugins())) {
         $this->watcher = AJXP_PluginsService::getInstance()->getPluginById("meta.watch");
     }
 }
开发者ID:Nanomani,项目名称:pydio-core,代码行数:17,代码来源:class.ShareCenter.php

示例9: init

 public function init($options)
 {
     parent::init($options);
     $this->useQueue = $this->pluginConf["USE_QUEUE"];
     try {
         $this->msgExchanger = ConfService::instanciatePluginFromGlobalParams($this->pluginConf["UNIQUE_MS_INSTANCE"], "AJXP_MessageExchanger");
         if (AuthService::$bufferedMessage != null && AuthService::getLoggedUser() != null) {
             $this->sendInstantMessage(AuthService::$bufferedMessage, ConfService::getCurrentRepositoryId(), AuthService::getLoggedUser()->getId());
             AuthService::$bufferedMessage = null;
         }
     } catch (Exception $e) {
     }
 }
开发者ID:floffel03,项目名称:pydio-core,代码行数:13,代码来源:class.MqManager.php

示例10: init

 public function init($options)
 {
     parent::init($options);
     $this->repository = ConfService::getRepository();
     if (!is_a($this->repository->driverInstance, "AjxpWrapperProvider")) {
         return;
     }
     $this->accessDriver = $this->repository->driverInstance;
     $this->urlBase = $this->repository->driverInstance->getResourceUrl("/");
     $this->baseProtocol = array_shift(explode("://", $this->urlBase));
     if (array_key_exists("meta.watch", AJXP_PluginsService::getInstance()->getActivePlugins())) {
         $this->watcher = AJXP_PluginsService::getInstance()->getPluginById("meta.watch");
     }
 }
开发者ID:biggtfish,项目名称:cms,代码行数:14,代码来源:class.ShareCenter.php

示例11: initMeta

 public function initMeta($accessDriver)
 {
     $this->accessDriver = $accessDriver;
     if (!empty($this->options["index_meta_fields"]) || $this->indexContent) {
         $metaFields = $this->metaFields;
         $el = $this->xPath->query("/indexer")->item(0);
         if ($this->indexContent) {
             if ($this->indexContent) {
                 $metaFields[] = "ajxp_document_content";
             }
             $data = array("indexed_meta_fields" => $metaFields, "additionnal_meta_columns" => array("ajxp_document_content" => "Content"));
             $el->setAttribute("indexed_meta_fields", json_encode($data));
         } else {
             $el->setAttribute("indexed_meta_fields", json_encode($metaFields));
         }
     }
     parent::init($this->options);
 }
开发者ID:crodriguezn,项目名称:administrator-files,代码行数:18,代码来源:class.AjxpLuceneIndexer.php

示例12: 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

示例13: init

 public function init($options)
 {
     parent::init($options);
     $options = $this->options;
     // BACKWARD COMPATIBILIY PREVIOUS CONFIG VIA OPTIONS
     if (isset($options["CUSTOM_DATA"])) {
         $custom = $options["CUSTOM_DATA"];
         $serverSettings = $this->xPath->query('//server_settings')->item(0);
         foreach ($custom as $key => $value) {
             $n = $this->manifestDoc->createElement("param");
             $n->setAttribute("name", $key);
             $n->setAttribute("label", $value);
             $n->setAttribute("description", $value);
             $n->setAttribute("type", "string");
             $n->setAttribute("scope", "user");
             $n->setAttribute("expose", "true");
             $serverSettings->appendChild($n);
         }
         $this->reloadXPath();
     }
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:21,代码来源:class.AbstractConfDriver.php

示例14: init

 public function init($options)
 {
     parent::init($options);
     if (!extension_loaded("openssl")) {
         return;
     }
     $keyFile = $this->getPluginWorkDir(true) . "/agent.pem";
     if (file_exists($keyFile)) {
         return;
     }
     $config = array("digest_alg" => "sha1", "private_key_bits" => 1024, "private_key_type" => OPENSSL_KEYTYPE_RSA);
     // Create the private and public key
     $res = openssl_pkey_new($config);
     if ($res === false) {
         AJXP_Logger::error(__CLASS__, __FUNCTION__, "Warning, OpenSSL is active but could not correctly generate a key for Zoho Editor. Please make sure the openssl.cnf file is correctly set up.");
         while ($message = openssl_error_string()) {
             AJXP_Logger::debug(__CLASS__, __FUNCTION__, "Open SSL Error: " . $message);
         }
     } else {
         openssl_pkey_export_to_file($res, $keyFile);
     }
 }
开发者ID:rcmarotz,项目名称:pydio-core,代码行数:22,代码来源:class.ZohoEditor.php

示例15: init

 public function init($repository, $options = null)
 {
     //$this->loadActionsFromManifest();
     parent::init($options);
     $this->repository = $repository;
 }
开发者ID:umbecr,项目名称:camilaframework,代码行数:6,代码来源:class.AbstractAccessDriver.php


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