views:

32

answers:

2

What class(FrontController , Bootstrap, Dispacher....) sets up the default structure path in ZF?

+1  A: 

Actually it's the dispatcher's job to find the requested action controller.

So you'll have to extend either Zend_Controller_Dispatcher_Abstract or Zend_Controller_Dispatcher_Standard or even create a completely new one based on Zend_Controller_Dispatcher_Interface to fit your requirements.

But be aware that you'll have to change the way Zend_Controller_Action_Helper_ViewRenderer tries to find the required view files, too.

Stefan Gehrig
+2  A: 

There is no single instance that has all the paths. Each component has it's own defaults, e.g. the FrontController knows that the controller directory should be named controllers, but it doesn't know how to make a full path from it (Dispatcher does it) or where to find the Action Helpers. That's defined in ActionHelper Broker. Consequently, Zend_View_Abstract holds the paths for View filters, helpers and scripts, etc.

Like @Pascal mentioned in his comment, you should not modify ZF at it's core. You will lose the changes once you update to a newer version anyway. Configure the paths through the API in your bootstrap or through the application.ini instead.

Gordon
I am doing it in the Controller plugin, In reality not modifying the Core is my main goal and the constraint, that is why I am using plugin, and from there specifying where to go if backend?frontend , and where to look models for it etc
simple
just need to specify depending on whichEnd to look in the APPLICATION_PATH. '/modules/modulename/Whichend/(controllers|view) , almost managed to do it, but having problems with setting up default backend Controller, Well planning to read the code and make a chart to understand it clearly - I got some interesting foe weekends =)
simple