[nycphp-talk] Config file format and admin suggestions
Cliff Hirsch
cliff at pinestream.com
Mon May 21 08:41:06 EDT 2007
On 5/19/07 6:42 PM, "Dell Sala" <dell at sala.ca> wrote:
> On May 19, 2007, at 4:46 PM, Cliff Hirsch wrote:
>> My config files are currently a bunch of define statements. I¹m
>> going to change the format as I rewrite the admin back-end and am
>> looking for suggestions
>
> ini files aren't bad. nice built-in php support with parse_ini_file()
>
>> I¹m also curious about how people go about setting available white
>> list values, default values, etc. without hardcoding them.
>
> For validating and accessing the values I wrap the loaded config data
> in a class. I don't see how you can avoid hardcoding the default
> values or validation rules, except maybe storing those things in
> another config file.
>
> -- Dell
Ini files are growing on me. Seems easy enough, although extra parsing seems
wasteful versus just using defines or array variables, especially with APC.
Cycles count. I don't want to lose my comments when I write to the file --
hopefully PEAR conf will handle this.
Cliff
More information about the talk
mailing list