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


PHP Manager::getPluginsDirectory方法代码示例

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


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

示例1: addPluginConfigs

 private function addPluginConfigs(ContainerBuilder $builder)
 {
     $plugins = Manager::getInstance()->getActivatedPluginsFromConfig();
     foreach ($plugins as $plugin) {
         $baseDir = Manager::getPluginsDirectory() . $plugin;
         $file = $baseDir . '/config/config.php';
         if (file_exists($file)) {
             $builder->addDefinitions($file);
         }
         $environmentFile = $baseDir . '/config/' . $this->environment . '.php';
         if (file_exists($environmentFile)) {
             $builder->addDefinitions($environmentFile);
         }
     }
 }
开发者ID:bossrabbit,项目名称:piwik,代码行数:15,代码来源:ContainerFactory.php

示例2: loadPluginInfoJson

 private function loadPluginInfoJson()
 {
     $path = \Piwik\Plugin\Manager::getPluginsDirectory() . $this->pluginName . '/' . self::PLUGIN_JSON_FILENAME;
     return $this->loadJsonMetadata($path);
 }
开发者ID:TensorWrenchOSS,项目名称:piwik,代码行数:5,代码来源:MetadataLoader.php

示例3: test_DirectoriesInPluginsFolder_areKnown

 /**
  * Check that directories in plugins/ folder are specifically either enabled or disabled.
  *
  * This fails when a new folder is added to plugins/* and forgot to enable or mark as disabled in Manager.php.
  *
  * @group Core
  */
 public function test_DirectoriesInPluginsFolder_areKnown()
 {
     $pluginsBundledWithPiwik = \Piwik\Config::getInstance()->getFromGlobalConfig('Plugins');
     $pluginsBundledWithPiwik = $pluginsBundledWithPiwik['Plugins'];
     $magicPlugins = 42;
     $this->assertTrue(count($pluginsBundledWithPiwik) > $magicPlugins);
     $plugins = _glob(\Piwik\Plugin\Manager::getPluginsDirectory() . '*', GLOB_ONLYDIR);
     $count = 1;
     foreach ($plugins as $pluginPath) {
         $pluginName = basename($pluginPath);
         $addedToGit = $this->isPathAddedToGit($pluginPath);
         if (!$addedToGit) {
             // if not added to git, then it is not part of the release checklist.
             continue;
         }
         $manager = \Piwik\Plugin\Manager::getInstance();
         $isGitSubmodule = $manager->isPluginOfficialAndNotBundledWithCore($pluginName);
         $disabled = in_array($pluginName, $manager->getCorePluginsDisabledByDefault()) || $isGitSubmodule;
         $enabled = in_array($pluginName, $pluginsBundledWithPiwik);
         $this->assertTrue($enabled + $disabled === 1, "Plugin {$pluginName} should be either enabled (in global.ini.php) or disabled (in Piwik\\Plugin\\Manager).\n                It is currently (enabled=" . (int) $enabled . ", disabled=" . (int) $disabled . ")");
         $count++;
     }
     $this->assertTrue($count > $magicPlugins);
 }
开发者ID:a4tunado,项目名称:piwik,代码行数:31,代码来源:ReleaseCheckListTest.php

示例4: addPluginConfigs

 private function addPluginConfigs(ContainerBuilder $builder)
 {
     $plugins = $this->pluginList->getActivatedPlugins();
     foreach ($plugins as $plugin) {
         $baseDir = Manager::getPluginsDirectory() . $plugin;
         $file = $baseDir . '/config/config.php';
         if (file_exists($file)) {
             $builder->addDefinitions($file);
         }
     }
 }
开发者ID:dorelljames,项目名称:piwik,代码行数:11,代码来源:ContainerFactory.php

示例5: getPathToPluginFolder

 /**
  * @return string
  */
 private function getPathToPluginFolder()
 {
     return \Piwik\Plugin\Manager::getPluginsDirectory() . $this->pluginName;
 }
开发者ID:piwik,项目名称:piwik,代码行数:7,代码来源:MetadataLoader.php


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