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


PHP Gpf_Plugins_Engine::getInstance方法代码示例

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


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

示例1: execute

 public function execute() {
     if(Gpf_Plugins_Engine::getInstance()->getConfiguration()->isPluginActive('AffiliateNetwork')){
         $Merchant = new Gpf_Db_Role();
         $Merchant->setId(Pap_Application::DEFAULT_ROLE_MERCHANT);
         $Merchant->load();
         $Merchant->setName('Network Owner');
         $Merchant->save();
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:9,代码来源:update_4.5.32.php

示例2: isPluginActive

 protected function isPluginActive($codename)
 {
     if (Gpf_Plugins_Engine::getInstance()->getConfiguration()->isPluginActive($codename)) {
         return "true";
     }
     return "false";
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:7,代码来源:AffiliateSignup.php

示例3: onStart

 protected function onStart() {
     parent::onStart();
     Gpf_Paths::getInstance()->saveServerUrlSettings();
     Gpf_Plugins_Engine::getInstance()->getAvailablePlugins();
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:5,代码来源:Merchant.class.php

示例4: check

 public function check()
 {
     if (!Gpf_Plugins_Engine::getInstance()->getConfiguration()->isPluginActive($this->pluginCode)) {
         throw new Gpf_Exception($this->_("Required plugin %s is not active", $this->pluginCode));
     }
     $plugin = Gpf_Plugins_Engine::getInstance()->findPlugin($this->pluginCode);
     if (version_compare($plugin->getVersion(), $this->minVersion) < 0) {
         throw new Gpf_Exception($this->_("Required plugin %s has to be in version %s or higher", $this->pluginCode, $this->minVersion));
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:10,代码来源:Core.php

示例5: updateAccountDirectory

 protected function updateAccountDirectory()
 {
     if ($this->isPending('clearTemplatesCache', $this->_('Clearing templates cache'))) {
         try {
             $this->removeTemplateCache();
         } catch (Exception $e) {
         }
         $this->setDoneAndInterrupt();
     }
     if ($this->isPending('copyTemplates', $this->_('Installing templates'))) {
         $this->copyTemplates();
         $this->setDoneAndInterrupt();
     }
     if ($this->isPending('updateEngineConfig', $this->_('Updating plugin engine'))) {
         Gpf_Plugins_Engine::getInstance()->refreshConfiguration();
         $this->setDone();
     }
     $this->importLanguages();
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:19,代码来源:UpdateAccountTask.class.php

示例6: onActivate

 public function onActivate() {
     if (!Gpf_Plugins_Engine::getInstance()->getConfiguration()->isPluginActive(Pap_Features_CommissionGroups_Definition::CODE_NAME)) {
         throw new Gpf_Exception($this->_('Plugin can not be activated because Commissions Group feature is not activated!'));
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:5,代码来源:Definition.class.php

示例7: execute

 public function execute() {
     if (in_array(Pap_Features_SplitCommissions_Definition::CODE ,Gpf_Plugins_Engine::getInstance()->getConfiguration()->getActivePlugins())) {
         $this->deleteSplitCommissionsMailTemplate();
         $this->createSplitCommissionsMailTemplate();
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:6,代码来源:update_4.5.5.php

示例8: execute

 public function execute() {
     if (in_array(Pap_Features_SplitCommissions_Definition::CODE ,Gpf_Plugins_Engine::getInstance()->getConfiguration()->getActivePlugins())) {
          $template = new Pap_Mail_SplitCommissionsMerchantOnSale();
          $template->setup(Gpf_Session::getAuthUser()->getAccountId());
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:6,代码来源:update_4.4.6.php

示例9: addPlugins

 private function addPlugins()
 {
     $plugins = new Gpf_Data_IndexedRecordSet('name');
     $plugins->setHeader(array('name'));
     foreach (Gpf_Plugins_Engine::getInstance()->getConfiguration()->getActivePlugins() as $pluginCode) {
         $plugins->add(array($pluginCode));
     }
     Gpf_Rpc_CachedResponse::addById($plugins, self::PLUGINS);
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:9,代码来源:ModuleBase.class.php

示例10: setActivePlugins

 private function setActivePlugins(Gpf_Data_RecordSet $inputResult)
 {
     $actualConfiguration = Gpf_Plugins_Engine::getInstance()->getConfiguration();
     if ($actualConfiguration === null) {
         if (defined('ENABLE_ENGINECONFIG_LOG')) {
             Gpf_Log::error('Plugin engine configuration is incorrect');
         }
         throw new Gpf_Exception("Plugin engine configuration is incorrect");
     }
     foreach ($inputResult as $record) {
         $codename = $record->get(Gpf_Plugins_Definition::CODE);
         if ($actualConfiguration->isPluginActive($codename)) {
             if (defined('ENABLE_ENGINECONFIG_LOG')) {
                 Gpf_Log::info('setActivePlugins with plugin: ' . $codename . ' - activating');
             }
             $record->set(Gpf_Plugins_Definition::ACTIVE, 'Y');
         } else {
             if (defined('ENABLE_ENGINECONFIG_LOG')) {
                 Gpf_Log::info('setActivePlugins with plugin: ' . $codename . ' - deactivating');
             }
             $record->set(Gpf_Plugins_Definition::ACTIVE, 'N');
         }
     }
     return $inputResult;
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:25,代码来源:PluginsList.class.php

示例11: onDeactivate

 public function onDeactivate() {
     if (Gpf_Plugins_Engine::getInstance()->getConfiguration()->isPluginActive('AffiliateNetwork')) {
         throw new Gpf_Exception($this->_('Multiple merchants feature can not be dactivated when Affiliate network is active'));
     }
 }
开发者ID:AmineCherrai,项目名称:rostanvo,代码行数:5,代码来源:Definition.class.php


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