url到http请求对象

时间:2010-06-11 14:10:24

标签: model-view-controller zend-framework zend-route

我需要像这样转换字符串:

$url = 'module/controller/action/param1/param1value/paramX/paramXvalue';

关于当前路由器的url(包括翻译等)。

通常我使用url view helper生成目标url,但为此我需要指定所有params,所以我需要手动爆炸字符串。我尝试使用请求对象,如下所示:

$request = new Zend_Controller_Request_Http();
// some code here passing the $url

Zend_Debug::dump($request->getControllerName()); // null instead of 'controllers'
Zend_Debug::dump($request->getParams());         // null instead of array

但似乎有人怀疑。我是否需要发送此请求?

如何很好地处理这个案子?

1 个答案:

答案 0 :(得分:0)

我没有在ZF找到任何这个任务的课程。

我刚刚爆炸了弦乐,这也很好。