Search code examples
phpurlzend-frameworkzend-routezend-view

What's the url being produced here


I'm getting a Route error from this line. Can someone tell me what's the final form of the url being built here:

$this->url(array('locate'=>'rom'), 'locate', true);

Solution

  • Nobody can tell you the URL as you have not provided enough details such as the route definition.

    What I can tell you is that the call to the URL helper is passing the following:

    • Set the locate parameter to "rom"
    • Use the locate route
    • Reset all parameters to their defaults.

    Regarding the last point; the defaults will be set in the route definition. If they are not defined there, they will fall back to the framework defaults of...

    • controller = "index"
    • action = "index"
    • module = "default"