Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using static variables

I'm using the ColdBox framework in ColdFusion. I would like to know how to use static variables in a function. Can anyone explain how, or suggest an alternative to the "static" concept.

like image 787
rique Avatar asked May 15 '26 19:05

rique


1 Answers

Using a component's metadata we can mimic static variable behavior:

  • Using Metadata To Add Static Variables to ColdFusion Components
  • ColdFusion Domain Objects, Static Methods & a Common API
like image 152
coldfusiondevshop Avatar answered May 19 '26 03:05

coldfusiondevshop