[dev] cfg() function?
Chuck Hagenbuch
chuck@horde.org
Mon, 12 Aug 2002 20:41:06 -0400
Quoting Jon Parise <jon@horde.org>:
> No explicit objections, but I'd be interested in hearing more about
> your thoughts on the subject.
Yeah, it's kind of an unformed idea so far.
> How would it handle nested configuration attributes?
Either multiple arguments and func_get_args() (would make having a default
value hard), or a / syntax (section/settingname) (performance issues).
> What would it do when it encounters an undefined index?
Well, part of my idea was that it could take a 'default' parameter, like
getFormData() does. Otherwise, return null or false or something -
something generally reasonable. But it might just be too much overhead for
not _that_ much gain, especially if we get people to use the new config
system to keep things up to date less painfully...
-chuck
--
Charles Hagenbuch, <chuck@horde.org>
"After a few minutes the most aromatic and nice smelling Italian coffee
will come out of the exhaustpipe." - Our stove-top espresso pot