Ding: Dependency Injection in your PHP Applications

PHP Examples for Dependency Injection (DI) and Aspect Oriented Programming (AOP)

NOTE: You will need to have log4php installed and in your include path (the src/main/php directory of the source distribution).

See this article if you're interesting in mixing Doctrine2 as the ORM: "Writing PHP applications with Doctrine2 as ORM and Ding as DI container"

For a description of the available annotations for components, you can read "Use annotations in your PHP Application to define Reusable Components with Ding".

A full description of the annotations used for dependency injection is in "Use Annotations in your PHP Code to achieve Dependency Injection with the Ding Container". If you are interested in a tour about using xml and yaml, see "Dependency injection with Xml and Yaml in the Ding container".

An example of an asterisk manager interface monitor application can be found at: "Create VoIP applications for Asterisk using PHP, PAMI, and Ding"

See "Aspect Oriented Programming in PHP with Ding " article if you're interested in Aspect Oriented Programming in PHP using Ding.

An example (still work in progress) of a web application can be found at:

Please see for all (and full) examples.