Sorry, that’s not was I was asking. I wanted to see the actual code that called getUtilities() that you referenced two E-mails ago to help figure out the “Value must be initialized before use.” error you were receiving.
Have you also thought about not injecting at all, but for dependencies that might not exist (which at that point isn’t much of a “dependent”) injecting WireBox and asking it if the object exists, and if so retrieving it? Another option would be to use MockBox to create stubs for the non-existent objects, though I’m not entirely sure how your code is working around the dependencies that does exist in some cases since I assume your code still references them.
return {
format = “XML”,
description = “A XML sample response packet for a list of resources.”,
body = fileRead(writePath)
};
}
By design, cannot the binder inject plugins in configure() or is that a bug?
If I inject coldbox with iniArg(), I can then use getColdbox().getPlugin() in the class. Although, I would rather prefer a direct call to a plugin (or whatever else im injecting).