gotzmann / comet

Modern PHP framework for building blazing fast REST APIs and microservices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dependency injection example to add services?

e1engineer opened this issue · comments

Really love the speed and simplicity of the framework as I'm testing it out. Keep it up.

Can you provide an example for dependency injection to add services? I'm referencing the slim framework example, but we cannot create the app with the AppFactory::create() method.

https://www.slimframework.com/docs/v4/concepts/di.html

Thanks.

Figured it out. Just combined Slim docs with PHP DI docs.

Figured it out. Just combined Slim docs with PHP DI docs.

Can you share some code snippet for this?
I am trying to inject DI container to Comet.