Would this be considered dependency injection, or delegation or object collaboration?https://gist.github.com/3428071
Would this be considered dependency injection?
design patterns;object oriented
The ors in your question make it sound like those three things are mutually exclusive.This is a form of dependency injection, albeit a non-conventional form of it. In the end, you are injecting Logger_model into User_model, so it is injection of a dependency. It is also true to say that Logger_model is a collaborator in this instance. And it is also true that User_model delegates logging to Logging_model.So, basically, it's all of the above.