How to parse a Zend URL for parameters?

Posted by wizzard on Stack Overflow See other posts from Stack Overflow or by wizzard
Published on 2010-03-16T22:11:23Z Indexed on 2010/03/16 22:41 UTC
Read the original article Hit count: 252

Filed under:

I am trying to extract the GET parameters from a ZF REST URL. It's not the current request and I don't want to call the URL or execute the route, I just need the parameters. I'm looking for a utility function like parse_url(), but for the Zend REST format. Is there one, or do I have to reinvent the wheel?

I've tried a few things like creating a new Zend_Controller_Request_Http but the parameters aren't being populated. It is a valid HTTP URL.

Edit: Upon request, a sample Zend URL:

http://localhost/index/index/param1/foo/param2/bar

So I am just trying to get param1 and param2 out of this URL.

© Stack Overflow or respective owner

Related posts about zend-framework