Ticket #118 (closed enhancement: fixed)
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
Note: See
TracTickets for help on using
tickets.
