Skip to content

Commit

Permalink
Merge pull request #503 from Eye4web/config-closure-fix
Browse files Browse the repository at this point in the history
Fix caching closure
  • Loading branch information
Danielss89 committed Jul 14, 2014
2 parents 4036d0c + 2a4659f commit 7b499ce
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 20 deletions.
23 changes: 21 additions & 2 deletions Module.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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(
Expand Down
18 changes: 0 additions & 18 deletions config/module.config.php
Original file line number Diff line number Diff line change
@@ -1,29 +1,11 @@
<?php
use ZfcUser\Controller\UserController;

return array(
'view_manager' => array(
'template_path_stack' => array(
'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',
Expand Down

0 comments on commit 7b499ce

Please sign in to comment.