Feature #2506

Automagic action argument registration

Added by Robert Lemke over 10 years ago. Updated almost 9 years ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
MVC
Start date:
2009-01-22
Due date:
% Done:

70%

PHP Version:
Has patch:
Complexity:

Description

Currently arguments of a controller must be registered manually through the

$this->arguments->addNewArgument()
method.

In the future this should be possible per action and by just defining arguments as method arguments (and properly documenting them):

/**
 * @param string $uuid
 * @param string $name 
 * @param string $description Description of blog posting
 */
public function updateAction($uuid, $name, $description) {
}

How validation is configured requires, however, further research.

Associated revisions

Revision 545d688f (diff)
Added by Robert Lemke over 10 years ago

  • FLOW3: (MVC) (mostly) implemented automatic registration of action arguments: Now you don't need to register arguments manually with $this->arguments->addNewArgument(...); but just write an action method with arguments and document them properly in the method's DocComment. Note that only basic support is implemented yet (stringm, integer and object arguments) and that other validators (such as "required") are not yet configured automatically. Addresses #2506.
  • FLOW3: (MVC) !!! Removed the initializeController() method from the AbstractController. Didn't find any meaningful use case at the moment (use initializeObject() instead!)
  • FLOW3: (MVC) Wrote proper tests for the ActionController (old ones didn't use mock objects)
  • Fluid: (View) Fixed resolveTemplatePathAndFilename() in the TemplateView: If no sub package was defined, the path contained a double slash "...//..""
  • Testing: Added more convience functions to the Accessible Proxy: with $proxy->_get() and $proxy->_set() even protected properties can be retrieved and set

History

#1 Updated by Robert Lemke over 10 years ago

  • % Done changed from 0 to 50

#2 Updated by Robert Lemke over 10 years ago

  • % Done changed from 50 to 70

Implemented support for object arguments. Not committed yet, though.

#3 Updated by Sebastian Kurfuerst over 10 years ago

I think that's all committed so far. Can we close this issue?

#4 Updated by Robert Lemke over 10 years ago

  • Status changed from Accepted to Resolved

Also available in: Atom PDF