Dependency injection with PHP