Skip to content

Instantly share code, notes, and snippets.

@cfvonner
cfvonner / Iterator.cfc
Created September 12, 2018 23:43 — forked from aliaspooryorik/Iterator.cfc
Iterator based on the IBO pattern
component {
function init(required query data){
setQuery(arguments.data);
return this;
}
/* ---------------------------- PUBLIC ---------------------------- */
/* --- Iterator methods ---------------------------- */
@cfvonner
cfvonner / actor.cfc
Created October 1, 2018 16:16
FW/1 API Problems
component name="Actor REST Endpoint" accessors="true" output="false" {
// FW/1 will use its dependency injection framework (DI/1) to find and
// inject the components defined below as properties
property fw;
property actorService;
property movieToActorService;
public void function default( rc ){
var q = actorService.getAll();
@cfvonner
cfvonner / test.cfm
Last active July 19, 2022 23:53
ColdFusion Anonymous Function
<cfscript>
add = function( x, y ) { return x + y; };
</cfscript>