-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Should we remove 'action', 'controller', 'directory' from request params? #676
Comments
1.
|
@WinterSilence
there is not default action (really, what you prefer to have as a default, log in or log off? And |
@djfd oh, I understood you - delete string |
--two tickets to Dublin just a kidding :D |
Hi,
Currently we have (./system/classes/Kohana/Request.php:974)
Eg. the situation with a numerous routes, where some of them require action to be explicitly supplied, while others do not, and some of them even do not have such parameter in their regex, just implied one.
Next, we are going to create canonic url for every page. Not having explicitly supplied
action
(as an example, the same for controller too, not sure about directory but likely it is quite similar) in params received via$p = $this->request->param()
we need to make a certain efforts to supply all required route params when further calling$this->request->route()->uri($p)
to avoid getting an exceptionRequired route parameter not passed: action
...Well, when there are just a few routes it could be ok, but with routes amount increase it get even more difficult to supply all that...
Adding
action
to params array$p['action'] = $this->request->action()
before calling...->route()->uri($p)
is not very good too, because we can want some URIs not having it...As for me, if any of these parameters was explicitly supplied in URI then we need to leave it in params array as well.
Any opinions?
Thanks
The text was updated successfully, but these errors were encountered: