Hi Serkan,
personally, I do not initialize anything in the bootstrap that is
request dependent. (I think of the bootstrap process as the same as
booting a computer with autostarting some services that you installed
(like, apache etc.); you just turn them on, although you might not need
them this time. However, if there is something in addition that you
need, then I start this manually)
Personally, I put these resources in my modules/<your-module-dir>/resources/
However, maybe you want to think about setting these things up in a
FrontController plugin? It might be appropriate in your situation.
Best regards
Christian
Thank you Christian
What if I want to set my navigation parameter in the bootstrap
according to request. For example I want to set productID parameter
for some navigation pages according to request.
I have the class that handles the parameter setting part. Again it is
not a reusable class for other projects and it is not an action helper
also, because it is only called in bootstrap.
What is the most appropriate position to place that class?
On Thu, Oct 7, 2010 at 12:58 PM, Christian Heinrich
<[email protected] <mailto:[email protected]>> wrote:
Hi Serkan,
if it is not reusable, then put the action helper under
modules/<your-module-if-you-have-any>/controllers/helpers/
Regards
Christian
Hi,
I need an approach advice,
I have a navigation and I set it's parameters in many controllers,
$registry = Zend_Registry::getInstance ();
$navigation = $registry ['Zend_Navigation'];
$navigation->findOneBy ( 'pageId', 'overview' )
->setParams ( array ('idProject' => $projectId ) );
$navigation->findOneBy ( 'pageId', 'users' )
->setParams ( array ('idProject' => $projectId ) );
it is obvious that using same code for every controller is
redundant.
Writing a reusable function is a better way. But what is the
right place for
this function;
- library/my/controller/plugin ?
- model/ ?
- controller/ ?
- or any other
library is I think a good choice but I only want to put
reusable classes
into library (for other projects) . This class may not be
suitable for other
projects