Skip to content

Instantly share code, notes, and snippets.

@Jrizzi1
Last active August 29, 2015 13:59
Show Gist options
  • Save Jrizzi1/10488828 to your computer and use it in GitHub Desktop.
Save Jrizzi1/10488828 to your computer and use it in GitHub Desktop.
Wirebox mapping
<cfcomponent output="false" hint="The default WireBox Injector configuration object" extends="coldbox.system.ioc.config.Binder">
<cfscript>
/**
* Configure WireBox, that's it!
now where do i place this?
map('elasticsearch').to('model.elasticsearch').property(name='elasticsearchUrl', dsl='coldbox.setting:elasticsearchUrl');
*/
function configure(){
// The WireBox configuration structure DSL
wireBox = {
// Scope registration, automatically register a wirebox injector instance on any CF scope
// By default it registeres itself on application scope
scopeRegistration = {
enabled = true,
scope = "application", // server, cluster, session, application
key = "wireBox"
},
// DSL Namespace registrations
customDSL = {
// namespace = "mapping name"
},
// Custom Storage Scopes
customScopes = {
// annotationName = "mapping name"
},
// Package scan locations
scanLocations = [],
// Stop Recursions
stopRecursions = [],
// Parent Injector to assign to the configured injector, this must be an object reference
parentInjector = "",
// Register all event listeners here, they are created in the specified order
listeners = [
// { class="", name="", properties={} }
]
};
// Map Bindings below
}
</cfscript>
</cfcomponent>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment