A
A
alestro2016-04-27 14:14:11
PHP
alestro, 2016-04-27 14:14:11

How do IoC containers work?

Do I understand correctly that an ioc container is an object that, when the application starts, instantiates all objects previously registered using a string key and a function or closure callback?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
OnYourLips, 2016-04-27
@OnYourLips

Almost. Only the container is part of such a system, it stores dependencies.
Look at the simplest example: pimple.sensiolabs.org The source
is very simple: https://github.com/silexphp/Pimple/blob/master/src...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question