Feature #9456

MVC arguments should be converted to their target type

Added by Robert Lemke about 9 years ago. Updated about 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
MVC
Start date:
2010-08-25
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

Description

MVC arguments are mapped from the arguments found in the HTTP request (GET / POST ...) to controller argument objects. Because the raw arguments provided by the requests are strings, they currently also end up as strings in the argument objects.

We should instead transform the arguments to their declared type if possible. As we already know the designated data type for each argument (from the annotations and type hints) that should be easily possible.


Related issues

Related to TYPO3.Flow - Bug #6195: Empty form fields converted to empty string instead of type declared for property Resolved

Associated revisions

Revision 112feeea (diff)
Added by Robert Lemke about 9 years ago

[+FEATURE] FLOW3 (MVC): Convert controller arguments into their declared data type

Controller Arguments are now converted into real integers, floats and booleans if
they wered declared as such in the type hint or @param annotation.

Empty values are now detected as such and result in NULL as the argument's value.

Change-Id: I3deace5bb0e40a7e0fb7e2302d4995d8f74f0009
Resolves: #9456
Fixes: #6195

Revision 95131fac (diff)
Added by Robert Lemke about 9 years ago

[+FEATURE] FLOW3 (MVC): Convert controller arguments into their declared data type

Controller Arguments are now converted into real integers, floats and booleans if
they wered declared as such in the type hint or @param annotation.

Empty values are now detected as such and result in NULL as the argument's value.

Change-Id: I3deace5bb0e40a7e0fb7e2302d4995d8f74f0009
Resolves: #9456
Fixes: #6195

History

#1 Updated by Robert Lemke about 9 years ago

  • Status changed from Accepted to Resolved
  • % Done changed from 0 to 100

#2 Updated by Robert Lemke about 9 years ago

  • Target version changed from 639 to 1.0 alpha 12

Also available in: Atom PDF