5 days ago by Michael Meyer

I just need to confirm something.

I'm trying to use slim 3 but with dependency injection, now there is a video on this in the slim 3 cart tutorials however Alex uses php-di/slim3-bridge to help with the dependency injection.

But heres my question

when you say


$container['HomeController'] = function ($container) {
	return new App\Controllers\HomeController($container);
};

it is already a from of dependency injection as you only instantiating that class ones?

Sign in or create an account to reply to this topic.