forked from elpete/CFCollection
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModuleConfig.cfc
More file actions
36 lines (30 loc) · 1.11 KB
/
ModuleConfig.cfc
File metadata and controls
36 lines (30 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
component {
this.name = "CFCollection";
this.author = "Eric Peterson";
this.description = "An array wrapper for functional programming";
this.version = "3.3.0";
this.autoMapModels = false;
this.cfmapping = "cfcollection";
function configure() {
settings = {
mixinLocations = ""
};
}
function onLoad() {
binder.map( "Collection" )
.to( "#moduleMapping#.models.Collection" )
.mixins( settings.mixinLocations );
binder.map( "Collection@CFCollection" )
.to( "#moduleMapping#.models.Collection" )
.mixins( settings.mixinLocations );
binder.map( "collect" )
.toFactoryMethod( "Collection", "getCollectFunction" );
binder.map( "collect@CFCollection" )
.toFactoryMethod( "Collection", "getCollectFunction" );
if ( structKeyExists( server, "lucee" ) && server.lucee.version >= 5 ) {
binder.map( "Collection" )
.to( "#moduleMapping#.models.MacroableCollection" )
.mixins( settings.mixinLocations );
}
}
}