ZF-1197: Route::assemble should strip right side URL parts which are equal to defaults

Issue Type: Improvement Created: 2007-04-04T02:54:52.000+0000 Last Updated: 2009-12-28T15:54:41.000+0000 Status: Resolved Fix version(s): - 0.9.2 (06/Apr/07)

Reporter: Ivan Shumkov (shumkov) Assignee: Michal Minicki (martel) Tags: - Zend_Controller

Related issues: Attachments:


Route::assemble return default action and controller names. Example: default route :controller/:action/* If action default, controller default and params empty assamble may return empty url. If action default and params empty assamble may return only controller.


Posted by Bill Karwin (bkarwin) on 2007-04-04T12:52:43.000+0000

Assign to Matthew.

Posted by Matthew Weier O'Phinney (matthew) on 2007-04-04T13:09:54.000+0000

Assigning to Martel

Posted by Michal Minicki (martel) on 2007-04-04T13:19:33.000+0000

Assemble method uses route defaults already. See unit tests.

If you have meant something else by that please provide working code sample explaining what you want to accomplish.

Posted by Michal Minicki (martel) on 2007-04-04T13:37:49.000+0000

Ok, after re-thinking it I guess I understandyour meaning now. You wish Zend_Controller_Router_Route to act similarly to Zend_Controller_Router_Route_Module - not to add parts to resulting URL when parameters ar marked as defaults, ie. when they're not required. Reopenning.

Posted by Pavel Vrany (derk) on 2009-12-28T15:54:39.000+0000

bug is still actual in version 1.9.

<pre class="highlight"> = "Zend_Controller_Router_Route" = "promo/:action/*" = "promo" = "index" = "index"

<pre class="highlight"> 

I get: /promo/test/module/promo/controller/index/par/value I want: /promo/test/par/value

Have you found an issue?

See the Overview section for more details.


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

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