Issues

ZF-5206: Missing method getCurrentRouteName in API Doc

Issue Type: Docs: Improvement Created: 2008-12-11T01:49:15.000+0000 Last Updated: 2008-12-21T05:03:26.000+0000 Status: Resolved Fix version(s): - 1.7.2 (23/Dec/08)

Reporter: Dennis Becker (radhad) Assignee: Matthew Weier O'Phinney (matthew) Tags: - Zend_Controller

Related issues: Attachments:

Description

Nowhere in the docs is described, how to get the current route name used forthe controller-action request. It is not in the "Reference Guide" nor in the API Doc, but in the API Doc should every method listet. Please add the method getCurrentRouteName() to Zend_Controller_Router_Route_Interface and to all classes which extends this class.

Comments

Posted by Matthew Weier O'Phinney (matthew) on 2008-12-11T05:10:47.000+0000

getCurrentRouteName() is a method of Zend_Controller_Router_Rewrite -- which is the appropriate class for it to be in. Zend_Controller_Router_Route_Interface defines routes that are attached to the rewrite router, and getCurrentRouteName() is used to retrieve the name of the current route that the rewrite router matched.

The method is not part of the router interface as we do not envision that every router would necessarily allow attaching multiple route objects.

Posted by Dennis Becker (radhad) on 2008-12-11T05:27:27.000+0000

Hmm... The Framework uses internally Zend_Controller_Router_Rewrite ? Shouldn't this method not be mentioned then somewhere in the Reference Guide? I have searched such a function for about an hour to find out that the instance of Zend_Controller_Front => getRouter() has this information and I think a lot of other developer would also need this quite often.

Posted by Matthew Weier O'Phinney (matthew) on 2008-12-11T06:13:24.000+0000

Re-opening; should document the getCurrentRoute() and getCurrentRouteName() methods.

Posted by Matthew Weier O'Phinney (matthew) on 2008-12-11T06:17:17.000+0000

Updated in trunk with r13154; will release with 1.7.2.

Posted by Dennis Becker (radhad) on 2008-12-11T06:28:54.000+0000

Thank you for updating the docs.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts