Skip to main content
Inspiring
December 13, 2013
Question

Can a function determine the access type of the call to it?

  • December 13, 2013
  • 0 replies
  • 428 views

I have a function, and even though its ACCESS attribute is set to 'public', it could feasibly be called by other access types.  For example:

<!--- In myPage.cfm --->

<cfset x = SomeObject.methodName() /> <!--- Called the method publicly --->

<!--- In the component holding the methodName() function, but from another function in the same file. --->

<cfset y = methodName() /> <!--- Called the method privately. --->

So far, polling getMetaData() and even getComponentMetaData(), all I can determine is the ACCESS attribute value of the function in question, but not the access type of how that method was invoked

    This topic is closed to new replies. Start a new post to keep the conversation going.