Injection DSL
inject="{namespace}:extra:extra:extra"Property Annotation
property name="service" inject="id:MyService";
property name="TYPES" inject="id:CustomTypes" scope="this";
property name="roles" inject="id:RoleService:getRoles" scope="instance";Constructor Argument Annotation
<--- Via tag based annotations --->
<cffunction name="init" returntype="any" output="false">
<cfargument name="myService" inject="UserService">
<cfargument name="cache" inject="cachebox:default">
</cffunction>
// Via script but alternative method as inline annotations are broken in ACF
/**
* Init
* @myService.inject UserService
* @cache.inject cachebox:default
*/
function init(required myService, required cache){
}Setter Method Annotation
Was this helpful?