views:

34

answers:

1

I need to convert string like this:

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

to url regarding current router (including translation and so on).

Usually I generate the target urls using url view helper, but for this I need to specify all params, so I would need to manually explode the string. I tried to use request object, like this:

$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

but this seems to be suspected. Do I need to dispatch this request?

How to handle this case well?

A: 

I haven't found any class in ZF for this task.

I just exploded the string, and this is fine too.

takeshin