Skip to main content
Participant
July 12, 2013
Question

cfcomponent and functions

  • July 12, 2013
  • 1 reply
  • 457 views

Lets say you have a project that uses two cfcomponent files, a.cfc and b.cfc.

You have functions in a.cfc that you'd like to be available within b.cfc, for example, within a.cfc is a debug handler that I would want to be used inside of cffuctions within b.cfc

Possible?

This topic has been closed for replies.

1 reply

BKBK
Community Expert
Community Expert
July 13, 2013

You could, within component b, invoke the function like this:

<cfset a_object = createobject("component","dotted_path_to_component_a")>

<cfset result = a_object.function_in_a()>