« Return to Thread: Shared Models in Different Modules
==== QUOTE ====
Perhaps we need a Zend_Loader::loadModel to load the required models
in each Action Controller, and of course, there could be a method, say,
setModuleModelDirectoryName().
The problem or issue i see with this is if you have a bunch of modules it would be pain to always keep modifying your bootstrap file to keep track of these.
what would be ideal is if when this command is given:
->addModuleDirectory($this->dirApplication . DIRECTORY_SEPARATOR . 'modules')
it would register all the model directories or something like that to handle it.
Not sure how it would be done but it's an idea.
Jon Whitcraft
Indianapolis Motor Speedway
jwhitcraft@...
________________________________
From: AmirBehzad Eslami [mailto:behzad.eslami@...]
Sent: Sun 12/2/2007 4:47 PM
To: Luke Crouch
Cc: Whitcraft, Jon; fw-mvc@...
Subject: Re: [fw-mvc] Shared Models in Different Modules
In my opinion, each Module should be self-contained. Let's look at
each module as a package. This allows you create new projects
via the well-known copy-paste technique! However, the default
module needs access to other models to collect the magnet content.
We can put "./application/modules" into the include_path.
But we cannot use the Zend_Loader to load models using the
following syntax: Zend_Loader('{modulename}_models_{ModelName}').
Because Zend_Loader checks for the class name to match via
the given parameter.
Perhaps we need a Zend_Loader::loadModel to load the required models
in each Action Controller, and of course, there could be a method, say,
setModuleModelDirectoryName().
-B
********************
********************
This E-mail (and attachments) may contain confidential/privileged information intended only for the named addressee(s). If you are not an intended recipient, do not read, copy, disseminate or take any action based on the content of this E-mail. Please notify the sender by reply E-mail and erase this E-mail from your system. Your assistance is appreciated. E-mail transmission may not be secure or error-free. The company is not responsible for any loss/damage arising from any virus transmitted.
********************
********************
« Return to Thread: Shared Models in Different Modules
| Free embeddable forum powered by Nabble | Forum Help |