diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-03-11 01:50:26 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2015-03-11 01:50:26 +0300 |
commit | 2c70df8bd427ca8ab83e714ed2cc897b87f3c624 (patch) | |
tree | a3e26a7b5f531c240da5cf368eb7c73b7724b1cb /core | |
parent | 56af15fb999c91e67dfde6564bbe545f125d4890 (diff) |
Add support for using dependency injection in widgets, menus, tasks…
Diffstat (limited to 'core')
-rw-r--r-- | core/Plugin.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/Plugin.php b/core/Plugin.php index af564a002b..bb361b5bb5 100644 --- a/core/Plugin.php +++ b/core/Plugin.php @@ -8,6 +8,7 @@ */ namespace Piwik; +use Piwik\Container\StaticContainer; use Piwik\Plugin\Dependency; use Piwik\Plugin\MetadataLoader; @@ -359,7 +360,7 @@ class Plugin $this->cache->save($cacheId, $classname); } - return new $classname; + return StaticContainer::get($classname); } public function findMultipleComponents($directoryWithinPlugin, $expectedSubclass) |