Exemple #1
0
 /**
  * Includes init script for provided plugin
  */
 public function initPlugin(OW_Plugin $pluginObject)
 {
     $this->addPackagePointers($pluginObject->getDto());
     $initDirPath = $pluginObject->getRootDir();
     if (OW::getApplication()->getContext() == OW::CONTEXT_MOBILE) {
         $initDirPath = $pluginObject->getMobileDir();
     }
     if (OW::getApplication()->getContext() == OW::CONTEXT_CLI) {
         $initDirPath = $pluginObject->getCliDir();
     } else {
         if (OW::getApplication()->getContext() == OW::CONTEXT_API) {
             $initDirPath = $pluginObject->getApiDir();
         }
     }
     OW::getEventManager()->trigger(new OW_Event("core.performance_test", array("key" => "plugin_init.start", "pluginKey" => $pluginObject->getKey())));
     $this->pluginService->includeScript($initDirPath . BOL_PluginService::SCRIPT_INIT);
     OW::getEventManager()->trigger(new OW_Event("core.performance_test", array("key" => "plugin_init.end", "pluginKey" => $pluginObject->getKey())));
 }