[TYPO3-mvc] Benefit of DI when referencing to a class (and not to an interface)?

Karsten Dambekalns karsten at typo3.org
Wed Jun 27 08:22:17 CEST 2012


Hi.

On 26.06.12 11:52, Roland wrote:
> do you really reduce dependency with this?
> 
> --- quote ---
> 
> /**
>  * @var Tx_Foo_Domain_Repository_BarRepository
>  * @inject
>  */
> protected $barRepository;
> 
> --- /quote ---
> 
> aren't you still dependent on a class named
> Tx_Foo_Domain_Repository_BarRepository?

Yes, you are. But at least you are not dependent on (a certain)
ObjectManager anymore.


Regards,
Karsten
-- 
Karsten Dambekalns
TYPO3 Core Developer, FLOW3 / Phoenix Team

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-typo3v4mvc mailing list