+ 5

Symfony | What are containers?

I didn't get what are "containers", is this about Symfomy's services? $this->getDoctrine() become $this->container...help :3

1st May 2017, 4:45 PM
Geoffrey L
Geoffrey L - avatar
3 Réponses
+ 6
Service container is the most important feature in Symfony. It decouples the dependency between your app and the services. This make your app components more reusable and configurable. Search "dependency injection" for a more detailed explanation.
1st May 2017, 5:39 PM
⏩▶Clau◀⏪
⏩▶Clau◀⏪ - avatar
+ 5
Thanks I will have a look at it ;)
1st May 2017, 7:42 PM
Geoffrey L
Geoffrey L - avatar
+ 4
After reading a while, may I say a "container" is a box contaning a unique instance of an object available inthe whole project as would be a singleton?
1st May 2017, 7:54 PM
Geoffrey L
Geoffrey L - avatar