Closed jakejohns closed 7 years ago
Nice. Do we want to allow for resolving services from strings? E.g., $resolver('foo') might ought to look into the DI container for a service matching 'foo', then fall back to a new instance of class foo. (That would mean injecting the container into the resolver, which seems reasonable.)
More like this?
Additionally...
Should this checking services first stuff be optional or configurable at all?
or is that just over complicating things.
eg a checkServices($bool)
method, or a flag on the constructor that if true, checks services and if false just give new instance? Maybe not needed.
Should there be a getResolutionHelper
method on Container
ala the getInjectionFactory
?
Or just let people set it up themselves?
If there's a method, should it return a new one each time, or treat it like a service?
Should this checking services first stuff be optional or configurable at all?
Hm. I say "not for now."
Should there be a getResolutionHelper method on Containerala the getInjectionFactory?
Yes. Return a new one each time.
Any bright ideas on where/how to include in the docs?
Any bright ideas on where/how to include in the docs?
In a separate PR. :-)
RE: #133 ...Thoughts?