當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Request::getRenamedModuleAndAction方法代碼示例

本文整理匯總了PHP中Piwik\API\Request::getRenamedModuleAndAction方法的典型用法代碼示例。如果您正苦於以下問題:PHP Request::getRenamedModuleAndAction方法的具體用法?PHP Request::getRenamedModuleAndAction怎麽用?PHP Request::getRenamedModuleAndAction使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Piwik\API\Request的用法示例。


在下文中一共展示了Request::getRenamedModuleAndAction方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: getPluginsInfo

 protected function getPluginsInfo($themesOnly = false)
 {
     $pluginManager = \Piwik\Plugin\Manager::getInstance();
     $plugins = $pluginManager->loadAllPluginsAndGetTheirInfo();
     foreach ($plugins as $pluginName => &$plugin) {
         $plugin['isCorePlugin'] = $pluginManager->isPluginBundledWithCore($pluginName);
         if (!empty($plugin['info']['description'])) {
             $plugin['info']['description'] = $this->translator->translate($plugin['info']['description']);
         }
         if (!isset($plugin['info'])) {
             $suffix = $this->translator->translate('CorePluginsAdmin_PluginNotWorkingAlternative');
             // If the plugin has been renamed, we do not show message to ask user to update plugin
             list($pluginNameRenamed, $methodName) = Request::getRenamedModuleAndAction($pluginName, 'index');
             if ($pluginName != $pluginNameRenamed) {
                 $suffix = "You may uninstall the plugin or manually delete the files in piwik/plugins/{$pluginName}/";
             }
             $description = '<strong><em>' . $this->translator->translate('CorePluginsAdmin_PluginNotCompatibleWith', array($pluginName, self::getPiwikVersion())) . '</strong><br/>' . $suffix . '</em>';
             $plugin['info'] = array('description' => $description, 'version' => $this->translator->translate('General_Unknown'), 'theme' => false);
         }
     }
     $pluginsFiltered = $this->keepPluginsOrThemes($themesOnly, $plugins);
     return $pluginsFiltered;
 }
開發者ID:dorelljames,項目名稱:piwik,代碼行數:23,代碼來源:Controller.php

示例2: prepareDispatch

 protected function prepareDispatch($module, $action, $parameters)
 {
     if (is_null($module)) {
         $module = Common::getRequestVar('module', self::DEFAULT_MODULE, 'string');
     }
     if (is_null($action)) {
         $action = Common::getRequestVar('action', false);
     }
     if (SettingsPiwik::isPiwikInstalled() && ($module !== 'API' || $action && $action !== 'index')) {
         Session::start();
         $this->closeSessionEarlyForFasterUI();
     }
     if (is_null($parameters)) {
         $parameters = array();
     }
     if (!ctype_alnum($module)) {
         throw new Exception("Invalid module name '{$module}'");
     }
     list($module, $action) = Request::getRenamedModuleAndAction($module, $action);
     if (!\Piwik\Plugin\Manager::getInstance()->isPluginActivated($module)) {
         throw new PluginDeactivatedException($module);
     }
     return array($module, $action, $parameters);
 }
開發者ID:drabberhorizon,項目名稱:ActiveNative,代碼行數:24,代碼來源:FrontController.php


注:本文中的Piwik\API\Request::getRenamedModuleAndAction方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。