You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Jim Riordan edited this page Aug 10, 2016
·
1 revision
###Adding explicit instances to the container
So far we've been adding objects to the container by specifying classes we want to be injected and relying on a dependency resolution mechanism. In some situations, we want to explicitly tell the container to instantiate an object using a new operator or invoke a static factory method ourselves. For those purposes, Yadic provides an addInstance method.