Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'core/Plugin/MetadataLoader.php')
-rw-r--r--core/Plugin/MetadataLoader.php15
1 files changed, 13 insertions, 2 deletions
diff --git a/core/Plugin/MetadataLoader.php b/core/Plugin/MetadataLoader.php
index bde849ff7e..b3d552cf80 100644
--- a/core/Plugin/MetadataLoader.php
+++ b/core/Plugin/MetadataLoader.php
@@ -11,6 +11,7 @@ namespace Piwik\Plugin;
use Exception;
use Piwik\Piwik;
use Piwik\Version;
+use Piwik\Plugin;
/**
* @see core/Version.php
@@ -90,12 +91,22 @@ class MetadataLoader
);
}
- private function loadPluginInfoJson()
+ /**
+ * It is important that this method works without using anything from DI
+ * @return array|mixed
+ */
+ public function loadPluginInfoJson()
{
- $path = $this->getPathToPluginFolder() . '/' . self::PLUGIN_JSON_FILENAME;
+ $path = $this->getPathToPluginJson();
return $this->loadJsonMetadata($path);
}
+ public function getPathToPluginJson()
+ {
+ $path = $this->getPathToPluginFolder() . '/' . self::PLUGIN_JSON_FILENAME;
+ return $path;
+ }
+
private function loadJsonMetadata($path)
{
if (!file_exists($path)) {