I'm looking for some assistance in properly setting up my application's autoloader, bootstrap, etc. to achieve something similar to the following Application file structure:
/application
/configs
application.ini
/controllers
/models
/User.php // Model_User
/modules
/blog
/admin
/controllers
/IndexController.php
/models
/User.php // Model_User
/views
/blocks
/menu.phtml
/helpers
/CoolMenu.php
/layouts
/layout.phtml
/scripts
/index
/index.phtml
/list.phtml
/themes
/some-custom-theme
/helpers
/layouts
/layout.phtml
/scripts
/index
/index.phtml
/list.phtml
/users
/index.phtml
/list.phtml
/list.ajax.phtml
/views
/blocks
/layouts
/scripts
/themes
/some-custom-theme
/blocks
/layouts
/scripts
/helpers
/Bootstrap.php
/library
/Zend
/MyCompany
/Model
/Api
/Abstract.php
/public
/css
/js
/images
/themes
/some-custom-theme
/css
/js
/images
The idea here of course is that the basic "application" structure can be overridden by modules, and the view can also be overridden at either level by themes.
Some my question is, while sticking as closely as possible to Zend Framework concepts and "ideals", keeping things as simple and elegant as possible and using, as much as possible, a "mainstream" ZF approach, how would you handle the following situations?
How would you set up the Autoloader and include paths to cleanly handle application controllers, models, views, and other application resources that may be (but aren't necessarily!) overridden by module resources?
How would you initialize the View to be able to override the default view resources in each of these scenarios with theme resources?
I understand this is a fairly general, open-ended request, but I've been researching and experimenting on this for a couple of days now, I've tried a dozen or more different approaches and I just can't seem to get it all working. Everything I try seems to break something else, or I just can't find the right methods in ZF, or whatever. I'm kind of at the point where I'd really just like to hear some fresh ideas from a fresh perspective. I don't expect a complete solution, I just need some solid ideas to get me thinking in a more useful direction!
PS: I'm using ZF 1.11