Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Merge getParam of Phalcon\Mvc\Dispatcher and getQuery of Phalcon\Http\Request

I want to handle basic url [http://someurl/edit/17] as well friendly url [http://someurl/edit?id=17]

I can write route for both the url

But in my action I have to check request object as well as dispatcher object to get the id param

Is there any way I can merger this object or their methods so that I can get param from both url in single object & method call?


Maybe you can use method reflection to assign the value in the dispatcher: