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:
authorMatthieu Aubry <mattab@users.noreply.github.com>2017-01-30 11:49:22 +0300
committerGitHub <noreply@github.com>2017-01-30 11:49:22 +0300
commita509c890ae192d3b71dcfb4d778f083705740c86 (patch)
tree17a52fdafe519493f113a49095b6694c8cd38cae /core/Console.php
parenta3b01e53c709b333e8fef2268fe0bfd554da053f (diff)
parent2667ec85d9a7b4cbd191eb1b2c2369268b105954 (diff)
Merge pull request #11298 from piwik/3.x-dev3.0.2-b3
Release 3.0.2-b3
Diffstat (limited to 'core/Console.php')
-rw-r--r--core/Console.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/core/Console.php b/core/Console.php
index e326211ef8..7a7629443f 100644
--- a/core/Console.php
+++ b/core/Console.php
@@ -209,6 +209,23 @@ class Console extends Application
$commands = array(
'Piwik\CliMulti\RequestCommand'
);
+
+ $commandsFromPluginsMarkedInConfig = $this->getCommandsFromPluginsMarkedInConfig();
+ $commands = array_merge($commands, $commandsFromPluginsMarkedInConfig);
+
+ return $commands;
+ }
+
+ private function getCommandsFromPluginsMarkedInConfig()
+ {
+ $plugins = Config::getInstance()->General['always_load_commands_from_plugin'];
+ $plugins = explode(',', $plugins);
+
+ $commands = array();
+ foreach($plugins as $plugin) {
+ $instance = new Plugin($plugin);
+ $commands = array_merge($commands, $instance->findMultipleComponents('Commands', 'Piwik\\Plugin\\ConsoleCommand'));
+ }
return $commands;
}
}