2009/6/25 Vince42 <z...@vineal.de>:
> Hi,
>
> Dalibor Karlović schrieb:
>> I think we should rethink this as it's obvious many people use the
>> default module just like any other so the behavior should be as
>> expected, even if adding an additional option.
>
> I circumvented this odd behaviour with
>
>   http://paste2.org/p/284720

You need to configure the autoloader in your main bootstrap for the
default module, something like:

$this->_resourceLoader = new Zend_Application_Module_Autoloader(array(
            'namespace' => 'Default',
            'basePath'  => APPLICATION_PATH . '/modules/default',
        ));

This then expects models etc like Default_Model_MyModel,
Default_Form_MyForm. I find it best to name the default module though
like this:

resources.frontcontroller.defaultmodule = "mynamespace"
resources.frontcontroller.params.prefixDefaultModule = true

and then use:

$this->_resourceLoader = new Zend_Application_Module_Autoloader(array(
            'namespace' => 'Mynamespace',
            'basePath'  => APPLICATION_PATH . '/modules/mynamespace',
        ));

This way all your modules are properly namespaced so you can use them
in other projects etc.


>
> but I think that this is ugly and - if not provided otherwise - ZF
> should treat the default module exactly as you described it and
> everybody would expect it to work.
>
> Unfortunately the Quickstart is omitting the module topic - and I really
> think that the module approach should be enforced as it leaves much more
> room for flexibility, self-contained / autarchic modules etc ... just my
> two cents. :)
>
> --
> Cheers,                        \\|//
> Vince                          (o o)
> ----------------------------ooO-(_)-Ooo-------------------------
>  '''   (o)_(o)                                        [ ][0][ ]
>  ô¿ô   (=°o°=)   World Domination by Copy and Paste   [ ][ ][0]
>  -    (")_(")                                        [0][0][0]
>
>  ()  ascii ribbon campaign - against html e-mail
>  /\  www.asciiribbon.org   - against proprietary attachments
>                                   Ooo.
> ---------------------------.ooO----(  )-------------------------
>                           (  )    (_/
>                            \_)
>
>



-- 
----------------------------------------------------------------------
[MuTe]
----------------------------------------------------------------------

Reply via email to