当前位置: 首页>>代码示例>>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;未经允许,请勿转载。