I think creating a regex route along with modifying the request in route
shutdown should do the trick. Have you tried that?

--
Hector


On Mon, Mar 8, 2010 at 11:29 AM, Joseph Crawford <i...@josephcrawford.com>wrote:

>
> Hello Everyone,
>
> I have been trying to figure out the best method to accomlish a task and I
> have tried a Front Controller Plugin, along with extending Routes.  I was
> unable to use the FC Plugin because neither the routeStartup/routeShutdown
> would work for me.  I also am using the Zend_Rest_Route in conjunction with
> Zend_Rest_Controller.
>
> Here is what I am trying to do.  I am creating a restful web api and each
> *version* will be it's own module.  When a user requests
> /2.0/controller/action I need to in this instance modify the request/route
> to change 2.0 into something ZF will allow for module names, currently I am
> using m2m0/.
>
> I have been able to get this to work by extending the Zend_Rest_Route class
> in my own library which is at the pastebin.  However it seems like overkill
> to copy all this code to accomplish this small task.
>
> http://pastebin.com/1F88qaQQ
>
> If you have any suggestions on a better method or how I could achieve this
> without the code duplication I would really like to hear about it.
>
> Thanks,
> Joseph Crawford
> --
> View this message in context:
> http://n4.nabble.com/Zend-Rest-Route-tp1585038p1585038.html
> Sent from the Zend Framework mailing list archive at Nabble.com.
>

Reply via email to