Last active
January 1, 2016 13:59
-
-
Save gpickin/8155035 to your computer and use it in GitHub Desktop.
CFC for testing "new" operator vs traditional cfc component object creation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent initmethod="init"> | |
<!--- init is the default or implied method ---> | |
<!--- having an incorrect initmethod name will cause the cfc to error ---> | |
<cffunction name="init"> | |
<cffile action = "append" file = "#expandpath('./testing.txt')#" output = "#getTickCount()# - Init"> | |
</cffunction> | |
<cffunction name="myinitmethod" access="private"> | |
<!--- having a private method will cause the cfc to error ---> | |
<cffile action = "append" file = "#expandpath('./testing.txt')#" output = "#getTickCount()# - InitMethod"> | |
<cfreturn this> | |
</cffunction> | |
</cfcomponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment