2009/6/28 Vince42 <[email protected]>:
> Hi,
>
> I thought that something like
>
> resources.db.adapter = "PDO_MYSQL"
> resources.db.params.host = "localhost"
> resources.db.params.username = "user"
> resources.db.params.password = "user"
> resources.db.params.dbname = "database"
>
> guestbook.resources.db.adapter = "PDO_SQLITE"
> guestbook.resources.db.params.dbname = "guestbook.db"
>
> would work as I thought that the module specific initialization would
> take precedence over the general one. What would be the best way to
> achieve this?
>
> I don't want to fetch the correct adapter and do all the other manual
> setup any time I am instantiating a new class in a module. I prefer to
> have the module's database adapter override the default adapter.

You would probably need a FC plugin or action helper for this,
Zend_App works before the dispatching process therefore it does not
know what module is being requested, so if you are using zend db table
the default adapter is set in the main db resource etc.

Also I dont think the db resource will be called twice in this setup,
you will need to have a module specific resource that you create
yourself.

>
> --
> 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