RE: [coldbox:17044] Is Wirebox capable of doing this or is there another way I can do this?

Oh, I see. I guess that’s even a little different. It’s not that you want different portions of your app to get different versions of object, you want the existence of a module to override all instances of it. Kind of like a module you can drop in that would modify the behavior of a core object for the entire app.

I’ll be honest, I’ve never tried that before. Luis may have some amazingly obvious way to do that but I’m not sure. Assuming the module mappings are processed after the root app’s mappings, can you access the actual mapping from the binder and modify to point to a different path? What happens if you just declare a mapping of the same ID in the module? Does that override, or just cause errors. I’m also trying to remember right now if modules actually use the same injector as the parent app, or if they use a child injector with it’s own binder of mappings.



ColdBox Platform Evangelist
Ortus Solutions, Corp

ColdBox Platform:

Yeah, I have a need for it and have emailed Luis directly thinking he might know some magic for it. But haven’t heard back as yet.

I tried the mapping with the same id, but it always pulled up the old one. Other than that I tried blindly to see how wirebox does it, and got lost fast, probably because I don’t know wirebox as well as I should just yet :frowning: