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