-- Martel Valgoerad <[EMAIL PROTECTED]> wrote
(on Tuesday, 28 November 2006, 10:29 AM +0100):
> Bluejay wrote:
> 
> >Hey all,
> >  I have the privilege of working on several different platforms  at 
> >work, and I'm very excited about including the ZendFramework in a lot of 
> >my applications.  However, a lot of my production applications are ran 
> >on Sun Servers running the SunOne webserver utilizing FastCGI.  SunOne, 
> >does not have support for mod_rewrite, so I've been trying to figure out 
> >a method that I can migrate my applications from Apache-based servers 
> >over to our SunOne servers.  This relies mainly on *not* using 
> >mod_rewrite.  With the latest preview release, what approaches can I use 
> >to solve my lack of mod_rewritability....
> 
> I was actively lobbying for support of the standard PHP URL scheme in Front 
> controller but this support was dropped along the way to incubator. Yet 
> it's a good time to discuss it again.

Actually, the HTTP request object supports this now:

    public function getControllerName()
    {
        return $this->getParam($this->getControllerKey());
    }

getParam() in the HTTP request object first searches the internal param
list, then $_GET, then $_POST.

This works as of last week when Zend_Http_Request was moved into
Zend_Controller_Request_Http.

<snip> 
> ===============================================================================
> 
> But if we would like to make the whole framework PHP URL scheme aware, then 
> I would recommend changing the routers and Request_Http as well.
> 
> Any artificially programmer created request parameters (like for example by 
> the router or in the application plugins) should override normal user 
> submitted ones (GET, POST, etc). I think everybody should agree here. So we 
> make the modification to Request Http __get method to include those 
> parameters. Since they are supposed to override anything else, we have to 
> place them in the front:
> 
>     public function __get($key)
>     {
>         switch (true) {
> +            case isset($this->_params[$key]):
> +                return $this->_params[$key];
>             case isset($_GET[$key]):
>                 return $_GET[$key];
>             case isset($_POST[$key]):
>                 return $_POST[$key];
>             case isset($_COOKIE[$key]):
>                 return $_COOKIE[$key];

This is how getParam() works (minus the $_COOKIE lookup), and makes
sense to me.

> And finally the routers should use $request->get/set instead of 
> getParams/setParams.

I'm not sure I follow here. Zend_Controller_Router does
$request->setParam() when setting parameters in the request object. Can
you give more context?

-- 
Matthew Weier O'Phinney
PHP Developer            | [EMAIL PROTECTED]
Zend - The PHP Company   | http://www.zend.com/

Reply via email to