diff options
author | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-10-30 01:35:05 +0300 |
---|---|---|
committer | Matthieu Napoli <matthieu@mnapoli.fr> | 2014-10-30 01:35:05 +0300 |
commit | 46b84557d30dcab91e5e4dfe07befafdea2cb33b (patch) | |
tree | 5a50fd55014bc113b20e4a4094db500903308c0f /core | |
parent | 49f56b612b95b4648a37d2546f05cad51dfea9c1 (diff) |
Replaced calls to $container->get() to $container->make() for controllers, makes sense since controllers are not services
Diffstat (limited to 'core')
-rw-r--r-- | core/FrontController.php | 8 | ||||
-rw-r--r-- | core/StaticContainer.php | 3 |
2 files changed, 5 insertions, 6 deletions
diff --git a/core/FrontController.php b/core/FrontController.php index 572ecd5744..a45a21da7c 100644 --- a/core/FrontController.php +++ b/core/FrontController.php @@ -121,7 +121,7 @@ class FrontController extends Singleton $class = $this->getClassNameController($module); /** @var $controller Controller */ - $controller = $container->get($class); + $controller = $container->make($class); $controllerAction = $action; if ($controllerAction === false) { @@ -147,7 +147,7 @@ class FrontController extends Singleton $parameters['widgetModule'] = $module; $parameters['widgetMethod'] = $action; - return array($container->get('Piwik\Plugins\CoreHome\Controller'), 'renderWidget'); + return array($container->make('Piwik\Plugins\CoreHome\Controller'), 'renderWidget'); } // TRY TO FIND ACTION IN REPORT @@ -158,7 +158,7 @@ class FrontController extends Singleton $parameters['reportModule'] = $module; $parameters['reportAction'] = $action; - return array($container->get('Piwik\Plugins\CoreHome\Controller'), 'renderReportWidget'); + return array($container->make('Piwik\Plugins\CoreHome\Controller'), 'renderReportWidget'); } if (!empty($action) && Report::PREFIX_ACTION_IN_MENU === substr($action, 0, strlen(Report @@ -170,7 +170,7 @@ class FrontController extends Singleton $parameters['reportModule'] = $module; $parameters['reportAction'] = $reportAction; - return array($container->get('Piwik\Plugins\CoreHome\Controller'), 'renderReportMenu'); + return array($container->make('Piwik\Plugins\CoreHome\Controller'), 'renderReportMenu'); } } diff --git a/core/StaticContainer.php b/core/StaticContainer.php index c78da90e51..35f486d801 100644 --- a/core/StaticContainer.php +++ b/core/StaticContainer.php @@ -11,7 +11,6 @@ namespace Piwik; use DI\Container; use DI\ContainerBuilder; use Doctrine\Common\Cache\ArrayCache; -use Interop\Container\ContainerInterface; /** * This class provides a static access to the container. @@ -28,7 +27,7 @@ class StaticContainer private static $container; /** - * @return ContainerInterface + * @return Container */ public static function getContainer() { |