网址为http请求对象

网址为http请求对象

问题描述:

我需要字符串转换是这样的:网址为http请求对象

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

到URL关于当前路由器(包括翻译等)。

通常我使用url视图助手生成目标网址,但为此我需要指定所有参数,所以我需要手动分解字符串。我试图使用请求对象,像这样:

$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 

但这似乎是怀疑。我需要派遣这个请求吗?

如何处理好这种情况?

+0

你好,你有空吗?如果是这样,我怎么能找到你? (在您的回复后将删除此评论) – 2011-11-26 09:51:14

我在这个任务中没有在ZF中找到任何类。

我只是爆炸了字符串,这也没关系。