<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
<ac:macro ac:name="unmigrated-inline-wiki-markup"><ac:plain-text-body><![CDATA[
In smal projects the current directory structure for controllers is sufficient. For bigger projects however, it might be useful to use subdirectories to group together certain functonalities for clarity reasons. Currently the controller in the url can't have underscores (they are filtered out). This change would keep underscores in place and replace spaces into underscores. The Zend::loadClass has to be adjusted as well so it can use subdirectories when the dirs parameter is not null.Zend Framework: Zend_Controller_Dispatcher Component Proposal
Proposed Component Name
Zend_Controller_Dispatcher
Developer Notes
http://framework.zend.com/wiki/display/ZFDEV/Zend_Controller_Dispatcher
Proposers
zf@keppens.net
Revision
(wiki revision: 10)
Table of Contents
1. Overview
2. References
3. Component Requirements, Constraints, and Acceptance Criteria
4. Dependencies on Other Framework Components
5. Theory of Operation
6. Milestones / Tasks
7. Class Index
8. Use Cases
Suppose one of the parts of your website is a Forum, then you could have following urls:
forum_topic/list
forum_topic/add
forum_topic/edit
forum_topic/delete
forum_post/list
forum_post/rate
forum_post/view
forum_post/add
forum_post/edit
forum_post/delete
etc...
This would yield in following files
/application/controllers/Forum/TopicController.php => Class Forum_TopicController
/application/controllers/Forum/PostController.php => Class Forum_PostController
9. Class Skeletons
Zend.php : lijn 84, change:
to:
Zend/Controller/Dispatcher.php: lijn 167, added:
Zend/Controller/Dispatcher.php: lijn 91, change
to:
3 Comments
comments.show.hideSep 20, 2006
Rob Allen
<p>How does this differ from <a class="external-link" href="http://framework.zend.com/wiki/x/CwM">http://framework.zend.com/wiki/x/CwM</a> ?</p>
Oct 10, 2006
Matthew Weier O'Phinney
<p>This is substantively the same as <a class="external-link" href="http://framework.zend.com/wiki/display/ZFPROP/Action+Controller+Directory+Tree+-+Christopher+Thompson">http://framework.zend.com/wiki/display/ZFPROP/Action+Controller+Directory+Tree+-+Christopher+Thompson</a>, and my comments there apply here as well: a combination of a rewrite rule and a minor modification to Zend_Controller_Dispatcher::_formatName() will solve the issue.</p>
Oct 10, 2006
Matthew Weier O'Phinney
<ac:macro ac:name="note"><ac:parameter ac:name="title">Zend Comment</ac:parameter><ac:rich-text-body>
<p>Duplicate of <a class="external-link" href="http://framework.zend.com/wiki/display/ZFPROP/Action+Controller+Directory+Tree">http://framework.zend.com/wiki/display/ZFPROP/Action+Controller+Directory+Tree</a></p></ac:rich-text-body></ac:macro>