0 Replies Latest reply: Dec 13, 2013 11:43 AM by Aegis Kleais RSS

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

    Aegis Kleais Community Member

      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