OOPhoto - Simple Service Objects In Place

<cfcomponent
	output="false"
	hint="I provide the based functionality for all Service objects.">
 
 
	<cffunction
		name="InjectDependency"
		access="package"
		returntype="any"
		output="false"
		hint="I inject dependency objecst into the VARIABLES scope of the extending Service object.">
 
		<!--- Define arguments. --->
		<cfargument
			name="Property"
			type="string"
			required="true"
			hint="The key at which the dependency will be stored."
			/>
 
		<cfargument
			name="Dependency"
			type="any"
			required="true"
			hint="The dependency object that is being injected into the extending service object."
			/>
 
		<!--- Inject the dependency object. --->
		<cfset VARIABLES[ ARGUMENTS.Property ] = ARGUMENTS.Dependency />
 
		<!--- Return this object for method chaining. --->
		<cfreturn THIS />
	</cffunction>
 
</cfcomponent>

For Cut-and-Paste