I am implementing a login widget via a view helper. I need to pass the instance of my authentication controller when creating the instance of the widget:
public function getViewHelperConfig()
{
return array(
'factories' => array(
'loginWidget' => function (???) {
$authController = ???
return new \Application\View\Helper\LoginWidget($authController);
}
)
);
}
The authentication controller is declared in the module.config.php
:
'controllers' => array(
'invokables' => array(
'Main\Controller\Index' => 'Main\Controller\IndexController',
'Main\Controller\Auth' => 'Main\Controller\AuthController'
),
),
How can I proceed?