Skip to content

Instantly share code, notes, and snippets.

@DominicWatson
Last active August 29, 2015 14:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DominicWatson/715253b4d0c4defe2fec to your computer and use it in GitHub Desktop.
Save DominicWatson/715253b4d0c4defe2fec to your computer and use it in GitHub Desktop.
Wirebox.cfc with explicit wiring configuration
component extends="coldbox.system.ioc.config.Binder" output=false {
public void function configure() output=false {
map( "myService" )
.to( "services.MyService" )
.asSingleton()
.noAutowire()
.initArg( name="someSetting", value=settings.mySetting )
.initArg( name="somecache", dsl="cachebox:myCache" );
map( "myOtherService" )
.to( "services.MyOtherService" )
.asSingleton()
.noAutowire()
.initArg( name="myService", ref="myService" );
}
}
@DominicWatson
Copy link
Author

I think this is the section of the docs that starts looking at explicit configuration:

http://wiki.coldbox.org/wiki/WireBox.cfm#Mapping_DSL

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment