News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Marcelo Gornstein's Blog:
Dependency injection with Xml and Yaml in the Ding container
February 24, 2012 @ 11:37:04

In this new post to his blog today Marcelo Gornstein looks at doing some dependency injection in a simple application via XML and YAML configurations and the Ding dependency injection container.

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.

0 comments voice your opinion now!
dig dependencyinjection dic configuration xml yaml


blog comments powered by Disqus

Similar Posts

Adobe Developer Source: Using PHP and Flex to Browse a MySQL Database

ThinkPHP Blog: Make the download of large files with PHP (and lighty) very easy

The Bakery: LightTPD and CakePHP setup in subdirectories

PHPBuilder.com: Using XML, Part 5 - SOAP and WSDL

PHPMaster.com: Managing Class Dependencies: Dependency Injection, Service Locators & Factories, Pt 2


Community Events

Don't see your event here?
Let us know!


laravel extension library php7 example community install introduction version interview series framework api voicesoftheelephpant opinion symfony2 release conference performance podcast

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework