When you inject a provider, the actual dependency is not being injected which means it most likely isn’t even being created yet. The provider is a placeholder object or mixin method, that when asked, will find WireBox from its scope registration and ask it for the dependency at that time. There are two main benefits to providers. The first is preventing scope-widening injection by not creating hard references to your dependencies in your object. The second is deferring the creation of the dependency until you need it. You appeared to be having issues with circular dependencies, so Luis suggested using a provider to defer the need to actually create the dependencies until they were actually used.
Thanks!
~Brad
ColdBox Platform Evangelist
Ortus Solutions, Corp
E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com