[ColdBox 4.1] Wirebox mappings in Modules

Is there a way to create Wirebox mappings in a modules config file instead of the main config\Wirebox.cfc file? Thanks!

Yes, the “binder” object is available in the configure() method. Read the commented out chunk of code in any auto-created moduleConfig.cfc and you’ll see a sample mapping.

It just looks like this:
binder.map().to();

Now, that said, you don’t have to map CFCs at all if you just put them in your module’s “models” folder and they will be recursively mapped automatically

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com