Task #3368
Move setArgumentsFromRawRequestData() from Router to RequestBuilder
| Status: | Resolved | Start date: | 2009-05-18 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assigned To: | Bastian Waidelich | % Done: | 100% |
|
| Category: | MVC | |||
| Target version: | TYPO3 Flow Base Distribution - 1.0 alpha 1 | |||
| Sprint: | Has patch: | |||
| PHP Version: | Complexity: |
Description
That method currently doesn't really do anything Routing-related, so it should be moved from
F3\FLOW3\MVC\Web\Routing\Router
to
F3\FLOW3\MVC\Web\RequestBuilder
Related issues
Associated revisions
FLOW3:
- Removed FLOW3\Utility\GenericCollection from repository, it's currently not needed. Resolves #3400
- Moved method setArgumentsFromRawRequestData() from Router to RequestBuilder. Resolves #3368
- Renamed URIHelper to URIBuilder. Removed Classes HelperInterface, AbstractHelper and InvalidViewHelper Exception. Adapted AbstractView & ViewInterface. Resolves #3303
- Added section parameter to URIFor() method of the URIBuilder
- Refactored Base controllers - controllerContext is no instance variable anymore and will be created when passed to view in initializeView(). Resolves #3404
- ControllerContext is of scope prototype now. Added setter/getter for URIBuilder. Some cosmetic changes.
- Added getRequestPath() to Request.
- ControllerKeys (@controller, @action, @package, @subpackage and @format) can now be set by request arguments. Resolves #2853
History
#1 Updated by Bastian Waidelich about 6 years ago
- Status changed from New to Needs Feedback
- Assigned To set to Bastian Waidelich
I started to move the method and write tests for it.
There's a side effect:
Before moving the method, GET & POST parameters overruled routing results as the method was called after Router->findMatchResults(). Now, "matchResults" would overwrite GET/POST parameters.
I could add a check in the route() method to only set arguments that haven't been set yet.
Before:
foreach ($matchResults as $argumentName => $argumentValue) {
if ($argumentName[0] !== '@') {
$this->request->setArgument($argumentName, $argumentValue);
}
}
After:
foreach ($matchResults as $argumentName => $argumentValue) {
if ($argumentName[0] !== '@' && !$this->request->hasArgument($argumentName)) {
$this->request->setArgument($argumentName, $argumentValue);
}
}
But I'm not sure, wheter Routing values should be overruled by GET/POST at all!?
#2 Updated by Robert Lemke about 6 years ago
No, the routing values should not be overruled by GET/POST, so changing the behavior is fine.
#3 Updated by Bastian Waidelich about 6 years ago
- Status changed from Needs Feedback to Resolved
- % Done changed from 0 to 100
Applied in changeset r2344.