Dependency Injection and the art of services and containers
Dependency Injection Container
  Unlock this challenge
Login Register

Challenge 1 / 1

Check out the following code:

use Pimple\Container;

$container = new Container();
$container['email_loader'] = function(Container $container) {
    return new EmailAddressLoader();
};

$loader1 = $container['email_loader'];
$loader2 = $container['email_loader'];

Which of the following is the most accurate?

Skip challenges and go to theNext Chapter

Turn Challenges Off?

All further challenges will be skipped automatically.
You can re-enable challenges at any time on this page or from your account page.