Marcelo Gornstein's Blog: Dependency injection with Xml and Yaml in the Ding container
Note: This article was originally published at PHPDeveloper on 24 February 2012.
In this past article I've discussed the dependency injection features when using annotations. This time, we'll see how to use the xml and yaml drivers to do the same (setter and constructor injection). If you don't know how to configure the xml and yaml drivers, please start by reading this.
He describes the different injection methods available with the container - setter injection, constructor injection and method injection. Example configuration content is included - both the XML and YAML versions.