Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 693901
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T02:48:05+00:00 2026-05-14T02:48:05+00:00

I am trying to extract the GET parameters from a ZF REST URL. It’s

  • 0

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.

Edit #2: I tried this but it does not seem to work:

$request = new Zend_Controller_Request_Http('http://localhost/home/test/param1/foo/param2/bar');
$front = Zend_Controller_Front::getInstance();
$route = new Zend_Rest_Route($front);
var_dump($route->match($request));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T02:48:06+00:00Added an answer on May 14, 2026 at 2:48 am

    How about $uri = Zend_Uri::factory( $yourUrl )‘ ? See Zend_Uri.

    Edit:
    Ah, I see what you mean now. In that case I believe you should try what Gordon suggested. Run your url through the match method of your route.

    There probably is a way to retrieve the route from the router with something like (not sure though):

    $route = Zend_Controller_Front::getInstance()
                                  ->getRouter()
                                  ->getRoute( 'theRouteName' );
    

    And then do semething like:

    $params = $route->match( $yourUrl );
    

    .. which should give you an array of parameters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to extract some data from XML but when I execute the
I'm trying to extract EXIF information from images using jQuery. I've tried using a
I am trying to extract data from XML. I generated C# classes using XSD
I'm trying to extract a string (which contains an integer) from an array and
I have writing Java code Using Jersey library to call Rest APIs. For my
I m trying to extract content based on given xpath. When it is just
I am trying to replace the JavaScript onclick event handler in ASP.NET that is
I'm trying to write a helper class that represents fields on an object. The
I've searched for many topics through stackoverflow and found many good solutions. For example,
How does Wikipedia implement the edit this section feature for its articles, wherein a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.