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


PHP Plugin::getPluginNameFromNamespace方法代码示例

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


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

示例1: loadAllPlugins

 public static function loadAllPlugins($testEnvironment = null, $testCaseClass = false, $extraPluginsToLoad = array())
 {
     if (empty($testEnvironment)) {
         $testEnvironment = new Piwik_TestingEnvironment();
     }
     DbHelper::createTables();
     $pluginsManager = \Piwik\Plugin\Manager::getInstance();
     $plugins = $testEnvironment->getCoreAndSupportedPlugins();
     // make sure the plugin that executed this method is included in the plugins to load
     $extraPlugins = array_merge($extraPluginsToLoad, array(\Piwik\Plugin::getPluginNameFromBacktrace(debug_backtrace()), \Piwik\Plugin::getPluginNameFromNamespace($testCaseClass), \Piwik\Plugin::getPluginNameFromNamespace(get_called_class())));
     foreach ($extraPlugins as $pluginName) {
         if (empty($pluginName)) {
             continue;
         }
         if (in_array($pluginName, $plugins)) {
             continue;
         }
         $plugins[] = $pluginName;
         if ($testEnvironment) {
             $testEnvironment->pluginsToLoad = array_merge($testEnvironment->pluginsToLoad ?: array(), array($pluginName));
         }
     }
     Log::debug("Plugins to load during tests: " . implode(', ', $plugins));
     $pluginsManager->loadPlugins($plugins);
 }
开发者ID:igorclark,项目名称:piwik,代码行数:25,代码来源:Fixture.php

示例2: getPluginsToLoadDuringTest

 private function getPluginsToLoadDuringTest()
 {
     $plugins = $this->vars->getCoreAndSupportedPlugins();
     // make sure the plugin that executed this method is included in the plugins to load
     $extraPlugins = array_merge(self::$extraPluginsToLoad, $this->vars->pluginsToLoad ?: array(), array(Plugin::getPluginNameFromBacktrace(debug_backtrace()), Plugin::getPluginNameFromNamespace($this->vars->testCaseClass), Plugin::getPluginNameFromNamespace($this->vars->fixtureClass), Plugin::getPluginNameFromNamespace(get_called_class())));
     foreach ($extraPlugins as $pluginName) {
         if (empty($pluginName)) {
             continue;
         }
         if (in_array($pluginName, $plugins)) {
             continue;
         }
         $plugins[] = $pluginName;
     }
     return $plugins;
 }
开发者ID:FluentDevelopment,项目名称:piwik,代码行数:16,代码来源:TestingEnvironmentManipulator.php

示例3: getDbName

 public function getDbName()
 {
     if ($this->dbName !== false) {
         return $this->dbName;
     }
     if ($this->persistFixtureData) {
         $klass = new ReflectionClass($this);
         $id = Plugin::getPluginNameFromNamespace($klass->getNamespaceName()) . "_" . $klass->getShortName();
         return $id;
     }
     return self::getConfig()->database_tests['dbname'];
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:12,代码来源:Fixture.php


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