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.
It's a simple change to the code in the Request_Abstract in getControllerName
and getActionName methods which instead of getting the names out of Request
getParams should use plain get:
public function getControllerName()
{
- return $this->getParam($this->getControllerKey());
+ return $this->get($this->getControllerKey());
}
This should do the trick for you. So if you want only to run the framework then
change the line directly in the code since you can't subclass there because
Zend_Controller_Request_Http extends Abstract.
===============================================================================
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];
And finally the routers should use $request->get/set instead of
getParams/setParams.
JIRA Issue:
http://framework.zend.com/issues/browse/ZF-604
Jay M. Keith - Zend Certified Engineer
--
Michael Minicki aka Martel Valgoerad | [EMAIL PROTECTED] |
http://aie.pl/martel.asc
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
"Never explain -- your friends do not need it and your enemies will not
believe you anyway." -- Elbert Hubbard