Question about coldbox.xml and Environments.xml

3 views
Skip to first unread message

jim collins

unread,
Dec 18, 2009, 11:23:23 AM12/18/09
to ColdBox Platform
If someone adds name/value pairs to the Environments.xml file but does
not put them in the coldbox.xml file , and the Environment url
matches , will the variable exist even though it wasn't declared in
the coldbox.xml? To rephrase, does environments.xml create variables
or only override existing variables declared in coldbox.cml

Doug Boude

unread,
Dec 18, 2009, 11:37:47 AM12/18/09
to col...@googlegroups.com
It will create them if they didn't already exist, or override them if they did.


--
You received this message because you are subscribed to the Google Groups "ColdBox: A ColdFusion Framework" group.
To post to this group, send email to col...@googlegroups.com
To unsubscribe from this group, send email to coldbox-u...@googlegroups.com
For more options, visit this group at http://groups-beta.google.com/group/coldbox
For more information, visit http://www.luismajano.com/projects/coldbox
For Documentation, visit http://ortus.svnrepository.com/coldbox/trac.cgi

br...@bradwood.com

unread,
Dec 18, 2009, 11:54:41 AM12/18/09
to col...@googlegroups.com
Yep, if you want to see how the environment interceptor works, just take
a look inside environmentControl.cfc in the interceptors folder. (at
least in 2.6.3)

Lines 129-137 are:

/* Check if overriding a set setting */
if( settingExists(trim(SettingsArray[i].xmlAttributes.name)) ){
setSetting( trim(SettingsArray[i].xmlAttributes.name) , thisValue );
}
else{
/* Do a full set */
"configSettings.#trim(SettingsArray[i].xmlAttributes.name)#" =
thisValue;
}
~Brad

jim collins

unread,
Dec 18, 2009, 1:38:17 PM12/18/09
to ColdBox Platform
Thanks for clearing that up guys.

On Dec 18, 11:54 am, b...@bradwood.com wrote:
> Yep, if you want to see how the environment interceptor works, just take
> a look inside environmentControl.cfc in the interceptors folder.  (at
> least in 2.6.3)
>
> Lines 129-137 are:
>
> /* Check if overriding a set setting */
> if( settingExists(trim(SettingsArray[i].xmlAttributes.name)) ){
>         setSetting( trim(SettingsArray[i].xmlAttributes.name) , thisValue );}
>
> else{
>         /* Do a full set */
>         "configSettings.#trim(SettingsArray[i].xmlAttributes.name)#" =
> thisValue;}      
>
> ~Brad
>
> -------- Original Message --------
> Subject: Re: [coldbox:3636] Question about coldbox.xml and
>
> Environments.xml

> From: Doug Boude <dougbo...@gmail.com>


> Date: Fri, December 18, 2009 10:37 am
> To: col...@googlegroups.com
>
> It will create them if they didn't already exist, or override them if
> they did.
>

> On Fri, Dec 18, 2009 at 10:23 AM, jim collins <jimcoll...@gmail.com>

Reply all
Reply to author
Forward
0 new messages