Created
August 17, 2021 20:40
-
-
Save adamcameron/8b91d7c5d6a18d79c1a9ad0944c0d3b5 to your computer and use it in GitHub Desktop.
And even more... this time with a sub class
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
// Base.cfc | |
component { | |
writeOutput("Top of pseudo-constructor of #getMetadata(this).name#<br>") | |
exit; | |
writeOutput("Bottom of pseudo-constructor of #getMetadata(this).name#<br>") | |
function init() { | |
writeOutput("In #getMetadata(this).name#.#getFunctionCalledName()#<br>") | |
} | |
} |
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
Top of testSub.cfm | |
Top of pseudo-constructor of test.exit.Base | |
Top of pseudo-constructor of test.exit.Sub | |
Bottom of pseudo-constructor of test.exit.Sub | |
In test.exit.Sub.INIT before super call | |
In test.exit.Sub.init | |
In test.exit.Sub.INIT after super call | |
Bottom of testSub.cfm |
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
Top of testSub.cfm | |
Top of pseudo-constructor of nonWheelsTests.exit.function.Base |
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
// Sub.cfc | |
component extends=Base { | |
writeOutput("Top of pseudo-constructor of #getMetadata(this).name#<br>") | |
//exit; | |
writeOutput("Bottom of pseudo-constructor of #getMetadata(this).name#<br>") | |
function init() { | |
writeOutput("In #getMetadata(this).name#.#getFunctionCalledName()# before super call<br>") | |
super.init() | |
writeOutput("In #getMetadata(this).name#.#getFunctionCalledName()# after super call<br>") | |
} | |
} |
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
<cfoutput> | |
Top of #getFileFromPath(getCurrentTemplatePath())#<br> | |
<cfset base = new Sub()> | |
Bottom of #getFileFromPath(getCurrentTemplatePath())#<br> | |
</cfoutput> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment