-
Notifications
You must be signed in to change notification settings - Fork 117
Closed
Milestone
Description
As I've seen this is planned already, I would suggest to add support for DI/1 right now. We are using the IoC framework already in our production sites.
I know it's currently not stable, but it works really good for now.
Here's what I've added in our Application.cfc to adding support for DI/1 in Taffy:
<cffunction name="getBeanListFromExternalFactory" output="false" access="private" returntype="string">
<cfset local.beanFactory = application._taffy.externalBeanFactory />
<cfset local.beanInfo = local.beanFactory.getBeanInfo().beanInfo />
<cfset local.beanList = '' />
<cfloop collection="#local.beanInfo#" item="local.beanName">
<cfif structKeyExists(local.beanInfo[local.beanName],'name') AND local.beanName NEQ local.beanInfo[local.beanName].name AND isInstanceOf(local.beanFactory.getBean(local.beanName),'taffy.core.resource')>
<cfset local.beanList = listAppend(local.beanList,local.beanName) />
</cfif>
</cfloop>
<cfreturn local.beanList />
</cffunction>