Re: [fw-general] reroute post requests

2007-06-11 Thread Bryce Lohr
Hi Martel, I'm glad to hear that. Ironically, I actually came to agree with your original point on the issue that, passing the whole Request object was a bit overkill. That said, I would not be entirely opposed to doing it anyway. :) I always did believe that the Routes should get both the Req

Re: [fw-general] reroute post requests

2007-06-09 Thread Martel Valgoerad
Bryce Lohr wrote: I'd second a feature request to add REQUEST_METHOD to the existing Router & Route classes. I'll probably make this change you have proposed some time ago, Bryce. But I'm not sure now is a good time with 1.0 being just around the corner. http://framework.zend.com/issues/bro

Re: [fw-general] reroute post requests

2007-06-08 Thread Bryce Lohr
FWIW, I use a custom Router (based on the Rewrite Router) that does its routing based on the combination of REQUEST_METHOD and REQUEST_URI (after the app's baseUrl has been stripped). I read my routes in from a config file that roughly looks like this: \n Yes, I have one line in this

Re: [fw-general] reroute post requests

2007-06-08 Thread Nico Edtinger
Hi Jens! What I did was a more generic way of changing the action depending on the request method. I extend Zend_Controller_Action to change dispatch(): public function dispatch($action) { $method = !empty($_SERVER['REQUEST_METHOD']) ? strtolower($_SERVER ['REQUEST_METHO

Re: [fw-general] reroute post requests

2007-06-08 Thread Martel Valgoerad
Jens Ruben wrote: Here’s my code but I think there should be a much better solution for this task. Can't you just subclass Zend_Controller_Action and point your forms at a specified method like execute? abstract class My_Form_Action extends Zend_Controller_Action { abstract protected sh

[fw-general] reroute post requests

2007-06-07 Thread Jens Ruben
Hello! I’m very new to the zend framework and I’ve tried to write a Controller_Plugin to reroute post requests. Whenever a user submits a form I’d like to check, if there’s a method called $action.’Validate’ - if yes, call it, check the result and reroute the request to a method called $action.