Whatever message this page gives is out now! Go check it out!

CFC Implicit notation

Last update:
May 18, 2026
This feature lets you set your CFC property as a simple variable assignment, without specifying the setters. That is, you can set the property by setting the property field rather than by invoking the setter method for the property. Similarly, the property value can be accessed by referencing the property name, rather than by invoking the getter for the property.
In ColdFusion, you can set invokeImplicitAccessor in a CFC, as well as in Application.cfc.

Example

empname.cfm
<cfscript>
    name = new empname();
    name.first="Paul";
    name.last="Scholes";
    writeOutput("First: #name.first#<br>");
    writeOutput("Last: #name.last#<br>");
</cfscript>
empname.cfc
component invokeImplicitAccessor = "true" { 

       property  string first;
       property string last;
   

    function setFirst(first){
        writeOutput("#getFunctionCalledName()# called<br>");
        variables.first = arguments.first;
    }

 

    function setLast(last){
        writeOutput("#getFunctionCalledName()# called<br>");
        variables.last = arguments.last;
    }


    function getFirst(){
        writeOutput("#getFunctionCalledName()# called<br>");
        return variables.first;
    }

 

    function getLast(){
        writeOutput("#getFunctionCalledName()# called<br>");
        return variables.last;
    }
}

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page