From: Jason S. <jsw...@ya...> - 2003-03-30 13:47:22
|
--- Arnold Cano <arn...@ya...> wrote: > > Also, have you thought about modifying the actions > > so it separates post > > requests form get requests? I ask because it is > > quite feasible that an > > app would not want to process an get requests and in > > both packages there > > is no distinction since the $_REQUEST superglobal is > > used. > > I can see where not being able to determine the > difference between get/post could be a problem. Perhaps the ActionForm class fould be altered to contain 4 HashMaps, you could continue to initialize it with the $_REQUEST variable, had have the Get() method return from that HashMap. You could add an Init() method, that the ActionController would alway call after creating the form instance, that would initialize several other HashMap vars with $_GET, $_POST and $_COOKIE. These might be accessed with ActionForm::GetG(), ::GetP() and GetC(). BTW, one feature I added to the HashMap was the ability to pass a default value if no corresponding value was found: function get($key, $default='__PHRAME_DEFAULT__') { if ($this->containsKey($key)) { return $this->_values[$key]; } if ($default != '__PHRAME_DEFAULT__') { return $default; } } __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com |