Feature #9626
Switch off autowiring for single methods via @autowiring annotation
Status: | Resolved | Start date: | 2010-09-07 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Robert Lemke | % Done: | 100% |
|
Category: | Object | |||
Target version: | TYPO3 Flow Base Distribution - 1.0 alpha 12 | |||
PHP Version: | Complexity: | |||
Has patch: |
Description
It would be nice to be able to switch off autowiring for certain (inject) methods and the constructor by adding an "@autowiring off" annotation to the respective method:
/** * @param Foo $foo * @autowiring off */ public function injectFoo(Foo $foo) { ... }
It should also be possible to switch off autowiring completely for the whole class by means of an @autowiring off annotation (currently that's only possible through some configuration in the Objects.yaml).
Related issues
Associated revisions
[+FEATURE] FLOW3 (Object): Control autowiring per class or method with annotations
Previously autowiring of object dependencies could only be switched on
or off for a whole class and only by configuration options in an Objects.yaml
file. Now they autowiring can be controlled per class or per single
methods by using the newly introduced @autowiring annotation.
Change-Id: Ie5e6bee228ae6cdebf3fcfab61066590190a16b5
Resolves: #9626
History
#1 Updated by Robert Lemke almost 5 years ago
- Subject changed from Switch off autowring for single methods via @autowiring annotation to Switch off autowiring for single methods via @autowiring annotation
#2 Updated by Robert Lemke almost 5 years ago
- Status changed from Accepted to Resolved
- % Done changed from 0 to 100
Applied in changeset e8e03d9f5df80ddfd05662f7eee2278f67188c31.