how to create a factory in zend framework 2?
问题 in my Module.php i have the fallowing methods that i would like to move them in a factory class so that i wont clutter the Module class : public function getControllerConfig() { return array( 'factories' => array( 'account-index' => function ($controllerManager) { $serviceManager = $controllerManager->getServiceLocator(); $accountService = $serviceManager->get('account-service'); return new Controller\IndexController($accountService); } ) ); } public function getServiceConfig() { return array