Created
December 21, 2013 10:39
-
-
Save anonymous/8067756 to your computer and use it in GitHub Desktop.
Code example of invoke() in action, for Luis.
This file contains hidden or 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
<cfscript> | |
// invokeOnRailo.cfm | |
test = new Test(); | |
methodToCall = "f"; | |
writeOutput("<h3>invoke() with name/value pairs</h3>"); | |
invoke(test, methodToCall, {one="tahi", two="rua", three="toru", four="wha"}); | |
writeOutput("<h3>invoke() with ordered arguments</h3>"); | |
invoke(test, methodToCall, ["tahi","rua","toru","wha"]); | |
</cfscript> |
This file contains hidden or 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
// Test.cfc | |
component { | |
public void function f(){ | |
writeDump(var=arguments); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment