DrupalCon Baltimore 2017: Dependency Injection in PHP and Drupal
About this talk
This talk explores the concept of Dependency Injection, clarifying its relevance in modern PHP development, particularly within the context of object-oriented programming. The speaker explains the fundamental principles of Dependency Injection, including constructor and setter injection, through relatable analogies and practical examples. Participants will discover the implementation of Dependency Injection containers, such as Pimple, and see how frameworks like Laravel and Symfony utilize this technique, with a strong focus on Symfony since it underpins Drupal's architecture. By the end of the session, attendees will gain insights into defining services and dependencies using YAML files, enhancing their ability to structure PHP applications effectively.