You should check if the config is actually merged ;)

Anyway, I strongly suggest not to use this approach, and instead use the
Zend\ModuleManager\Feature\DependencyIndicatorInterface

It's a bit more work, but it performs better and is less "magic"

Marco Pivetta

http://twitter.com/Ocramius

http://ocramius.github.com/


On 30 April 2013 14:01, booradleys [via Zend Framework Community] <
ml-node+s634137n4659885...@n4.nabble.com> wrote:

> 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
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://zend-framework-community.634137.n4.nabble.com/ZF2-Enable-additional-modules-in-local-development-environment-tp4657754p4659885.html
>  To start a new topic under Zend Framework, email
> ml-node+s634137n634138...@n4.nabble.com
> To unsubscribe from Zend Framework Community, click 
> here<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=634137&code=b2NyYW1pdXNAZ21haWwuY29tfDYzNDEzN3wxNzE0OTI1MTk4>
> .
> NAML<http://zend-framework-community.634137.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: 
http://zend-framework-community.634137.n4.nabble.com/ZF2-Enable-additional-modules-in-local-development-environment-tp4657754p4659886.html
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to