All Questions
Tagged with php5 dependency-injection
3 questions
1
vote
1
answer
128
views
Create an object when you need it! in PHP
Well Iam trying to learn OOP for a while now, My idea here is to create a simple CMS kind of thing.And I did something like this:
App Class:
...
1
vote
3
answers
294
views
Dependency injection/dependency injection containers in MVC web app
I just learned about dependency injection/dependency injection containers, and I realize that the controller in my MVC web application is hard to test.
My original controller class:
...
2
votes
1
answer
334
views
Receiving data from a database
I am learning OOP using PHP5 and I wrote two simple classes for receiving data from a database using the dependency injection pattern and rendering a grid with Twig.
Does this code have sense for OOP ...