url to http request object
        Posted  
        
            by takeshin
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by takeshin
        
        
        
        Published on 2010-06-11T14:10:24Z
        Indexed on 
            2010/06/11
            14:12 UTC
        
        
        Read the original article
        Hit count: 316
        
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?
© Stack Overflow or respective owner