From 2a4659f3cfc3c5f2e06ccd1d3fbc99f2a8b9d9c5 Mon Sep 17 00:00:00 2001 From: Danielss89 Date: Mon, 14 Jul 2014 11:46:35 +0200 Subject: [PATCH] Fix caching closure --- Module.php | 23 +++++++++++++++++++++-- config/module.config.php | 18 ------------------ 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/Module.php b/Module.php index 024ef76a..d2d236f8 100644 --- a/Module.php +++ b/Module.php @@ -2,12 +2,11 @@ namespace ZfcUser; -use Zend\ModuleManager\ModuleManager; use Zend\ModuleManager\Feature\AutoloaderProviderInterface; use Zend\ModuleManager\Feature\ConfigProviderInterface; use Zend\ModuleManager\Feature\ServiceProviderInterface; -use Zend\Stdlib\Hydrator\ClassMethods; use ZfcUser\Controller\RedirectCallback; +use ZfcUser\Controller\UserController; class Module implements AutoloaderProviderInterface, @@ -50,6 +49,26 @@ public function getControllerPluginConfig() ); } + public function getControllerConfig() + { + return array( + 'factories' => array( + 'zfcuser' => function($controllerManager) { + /* @var ControllerManager $controllerManager*/ + $serviceManager = $controllerManager->getServiceLocator(); + + /* @var RedirectCallback $redirectCallback */ + $redirectCallback = $serviceManager->get('zfcuser_redirect_callback'); + + /* @var UserController $controller */ + $controller = new UserController($redirectCallback); + + return $controller; + }, + ), + ); + } + public function getViewHelperConfig() { return array( diff --git a/config/module.config.php b/config/module.config.php index cac5fab9..7fa725c5 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -1,5 +1,4 @@ array( @@ -7,23 +6,6 @@ 'zfcuser' => __DIR__ . '/../view', ), ), - 'controllers' => array( - - 'factories' => array( - 'zfcuser' => function($controllerManager) { - /* @var ControllerManager $controllerManager*/ - $serviceManager = $controllerManager->getServiceLocator(); - - /* @var RedirectCallback $redirectCallback */ - $redirectCallback = $serviceManager->get('zfcuser_redirect_callback'); - - /* @var UserController $controller */ - $controller = new UserController($redirectCallback); - - return $controller; - }, - ), - ), 'service_manager' => array( 'aliases' => array( 'zfcuser_zend_db_adapter' => 'Zend\Db\Adapter\Adapter',