David Rogers
08/24/2022, 3:48 PMgetInstance
passed to init arguments, I think they may not be available though, maybe I am misunderstanding or this is by design.
// coldbox/system/ioc/Injector.cfc
case "provider": {
// verify if it is a simple value or closure/UDF
if ( isSimpleValue( arguments.mapping.getPath() ) ) {
oModel = getInstance( arguments.mapping.getPath() ).$get();
} else {
var closure = arguments.mapping.getPath();
oModel = closure( injector = this ); // initArguments not passed here?
}
break;
}
David Rogers
08/24/2022, 4:15 PM