Re: [SMARTY] defining arrays in config files

From: Date: Mon, 23 Feb 2004 20:30:12 +0000
Subject: Re: [SMARTY] defining arrays in config files
References: 1 2 3 4 5 6 7  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11009@lists.php.net to get a copy of this message
On Mon, 2004-02-23 at 13:55, Tarik ANSARI wrote: > I think that it's exactly what we gonna do. This syntax highlighted as well > to me to be used in config files following the logic of the template syntax > as described in the doc. > Moreover, we need to support key assignation : > > [section] > foo.bar[0] = testme > foo.bar[1] = testme2 > bar[0].foo = blabla numerical indexes are probably ok, they are valid smarty syntax. > > as well as key names coming from php constants or assigned php variables : > > [section] > foo.bar[$ERRNO1] = testme > foo.bar[$smarty.const.ERRNO2] = testme2 > bar.$key_string1 = blabla > bar.$ERRNO3 This I'm skeptical about. IMHO config files should contain static name=value pairs, nothing more. Anything beyond that should be handled outside of the config file. Maybe your particular problem should be understood better (by us) before we go diving in and complicating config file logic. Another alternative is to use a custom config file resource, I believe messju added that support recently. Monte

« previous php.smarty.general (#11009) next »