當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。