Thank you @Ocramius.
Here is what i did:
public function init(ModuleManager $mm) {
$config = $this->getConfig();
$object_manager = $config['Application']['object_manager'];
switch ($object_manager) {
case 'orm':
$mm->loadModule('DoctrineORMModule');
$mm->loadModule('ZfcUserDoctrineORM');
$mm->loadModule('BjyAuthorize');
break;
case 'odm':
$mm->loadModule('DoctrineMongoODMModule');
$mm->loadModule('ZfcUserDoctrineMongoODM');
$mm->loadModule('BjyAuthorizeDoctrineMongoODM');
break;
default:
$mm->loadModule('DoctrineORMModule');
$mm->loadModule('ZfcUserDoctrineORM');
$mm->loadModule('BjyAuthorize');
break;
}
}
But something is wrong somewhere:
Fatal error: Uncaught exception 'Zend\View\Exception\RuntimeException' with
message 'Zend\View\Renderer\PhpRenderer::render: Unable to render template
"error"; resolver could not resolve to a file' in
vendor\zendframework\zendframework\library\Zend\View\Renderer\PhpRenderer.php:499
Stack trace:
#0 vendor\zendframework\zendframework\library\Zend\View\View.php(205):
Zend\View\Renderer\PhpRenderer->render(Object(Zend\View\Model\ViewModel))
#1 vendor\zendframework\zendframework\library\Zend\View\View.php(233):
Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#2 vendor\zendframework\zendframework\library\Zend\View\View.php(198):
Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))
#3
vendor\zendframework\zendframework\library\Zend\Mvc\View\Http\DefaultRenderingStrategy.php(126):
Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#4 [internal function]: Zend\Mvc\View\Http\DefaultRenderi in
vendor\zendframework\zendframework\library\Zend\View\Renderer\PhpRenderer.php
on line 499
--
View this message in context:
http://zend-framework-community.634137.n4.nabble.com/ZF2-Enable-additional-modules-in-local-development-environment-tp4657754p4659885.html
Sent from the Zend Framework mailing list archive at Nabble.com.
--
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]