Feature #324

Add support for "required" dependencies via setter injection

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

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Object
Target version:
-
Start date:
2008-02-19
Due date:
% Done:

100%

PHP Version:
Has patch:
Complexity:

Description

Currently all dependencies injected through autowired setter injection (see #319) are optional.

This should be configurable through a "@required" annotation on the inject* method. If an inject method is marked as required, the object builder would throw an exception if the dependencies can't be resolved. Such an exception would not be thrown for optional dependencies.

Associated revisions

Revision 29433667 (diff)
Added by Robert Lemke over 11 years ago

  • FLOW3: (Component) Added support for @required setter-injected dependencies. Resolves #324.
  • FLOW3: (Documentation) Updated the Component documentation. Added a new section about required and optional dependency injection and about the new "inject*" methods for setter injection with autowiring support.
  • PhoneBookTutorial, Testing: Added @required tags where necessary.
  • FLOW3: (Reflection) Whitespace fixes

History

#1 Updated by Robert Lemke over 11 years ago

  • Target version deleted (18)

Also available in: Atom PDF