<cffunction
name="OnMissingMethod"
access="public"
returntype="any"
output="false"
hint="I handle calls to methods that do not exist.">
<cfargument
name="MissingMethodName"
type="string"
required="true"
hint="I am the name of the method that was called."
/>
<cfargument
name="MissingMethodArguments"
type="struct"
required="true"
hint="I am the arguments that were passed to the missing method."
/>
<cfset var LOCAL = {} />
<cfif REFindNoCase(
"WithTransaction$",
ARGUMENTS.MissingMethodName
)>
<cfset LOCAL.MethodName = REReplace(
ARGUMENTS.MissingMethodName,
"WithTransaction$",
"",
"one"
) />
<cfreturn THIS.ExecuteWithTransaction(
LOCAL.MethodName,
ARGUMENTS.MissingMethodArguments
) />
<cfelse>
<cfthrow
type="OOPhoto.BaseService.InvalidMethod"
message="The method you requested could not be found."
detail="The method you requested, #UCase( ARGUMENTS.MissingMethodName )#, could not be accessed."
/>
</cfif>
</cffunction>