Ticket #118 (closed enhancement: fixed)

Opened 3 years ago

Last modified 3 years ago

Complex Variables for Settings in Config

Reported by: lmajano Owned by: lmajano
Priority: high Milestone: 2.0.0
Component: Coldbox.xml Version:
Severity: normal Keywords:
Cc:

Description (last modified by lmajano) (diff)

I wanted to do this for a long time and finally came up with a great solutions for declaring complex variables via the config.xml without any funky xml.

Array Declarations Done in the value element as such:

<Setting name="NameArray"   value="[luis, john, ted]" />
<Setting name="NumberArray" value="[1,2,3,4,5,6]" />

Isn't this easy!!

Structure Declarations Done in the value element as such:

<Setting name="MyStructure" value="{name:Luis,city:redlands,country:usa}" />

WOW!!! This will create a structure named MyStructure? with 3 keys and their appropiate values. Is this easy or what?

  • Arrays use the []
  • Structures use the {}

Change History

Changed 3 years ago by lmajano

  • status changed from new to closed
  • resolution set to fixed

Changed 3 years ago by lmajano

  • description modified (diff)
Note: See TracTickets for help on using tickets.