Re: [Patch]LiveUser
| From: | Bertrand Mansion | Date: | Sun, 13 Apr 2003 22:00:12 +0000 |
| Subject: | Re: [Patch]LiveUser | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4832@lists.php.net to get a copy of this message | ||
<bjoernkraus@web.de> wrote :
> Hi!
>
> I checked out the changes Jean-Marc proposed.
> The idea of the readConfigArray() method sounds good to me. It seems to be a
> smarter way to change standard values than the one I'm using in the
> examples. I just want to add one line:
>
> <snip>
> if (is_array($configArray)) {
> foreach ($configArray as $key => $value) {
> + if (isset($this->$key)) {
> $this->$key = $value;
> + }
> }
> return true;
> }
> </snip>
>
> The change in _readConfigFilePHP() is definitely wrong here. Think about the
> situation you already imported the file for some reasons: You won't be able
> to access the config var in the method.
>
> All other modifications seems to be ok.
Hi Bjoern,
I have written and released the Config package. I would suggest you use the
same format as the one that is output by Config when you parse the XML
liveuser config and output it as a php array. The main difference is that it
adds # for values and @ for attributes when these are set in the XML.
If you want to test it, there are some examples in the docs/ directory of
the package.
Why use this format instead of the older one ?
Because when you will want to write a front-end for liveUser, it will be
made easier if you use this class. It will also be easier for users to
manipulate their liveuser config files.
Please let me know what you think of this idea.
Bertrand Mansion
Mamasam