Skip to content

Instantly share code, notes, and snippets.

@jaredbeck
Last active December 10, 2015 06:08
Show Gist options
  • Save jaredbeck/4392055 to your computer and use it in GitHub Desktop.
Save jaredbeck/4392055 to your computer and use it in GitHub Desktop.
Constructors in ColdFusion
component {
if (NOT StructKeyExists(this, 'initialized') OR this.initialized EQ false) {
init();
}
public void function init() {
this.foo = 'bar';
this.initialized = true;
}
}
component {
public void function init() {
this.foo = 'bar';
}
}
component {
this.foo = 'bar';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment