[PEPr] Comment on Text::PathArray
| From: | Denny Shimkoski | Date: | Sat, 06 May 2006 00:11:31 +0000 |
| Subject: | [PEPr] Comment on Text::PathArray | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-42456@lists.php.net to get a copy of this message | ||
Denny Shimkoski (http://pear.php.net/user/denny) has commented on the proposal for Text::PathArray.
Comment:
Hello all and thanks for the prompt feedback.
I've updated the class according to some of the suggestions and uploaded
it here: http://bytebrite.com/pear/path.phps
You can copy and paste to test it locally or just view the saved output in
the comments at the bottom of the file.
To address each individual directly --
Matthew, inspiration of method load(), to you I give thanks. The method
accepts strings and associative arrays.
I don't think your second suggestion will work though, since it's pretty
much impossible to tell what's a variable and what's a value. Probably
best to leave that to the particular application.
Christian, it's not too small, it's just highly efficient! Ha ha! We have
once again succeeded in bending the language to our designs!
Philippe, in practice I've found the numeric indexing scheme works best.
The application decides what is what and where is what (what?!). Sometimes
the other access method comes in handy though.
Martin, I'm not stuck on the name. I think PathArray is apt though, as the
class basically represents an array of information that's delimited by
strings. In any case, whatever the group decides is fine by me.
As for the iterator, the toArray method provides a way to do this in a
pairwise fashion. Alternatively, the user can access the $vars member
directly, which is a numerically indexed array of the entire path.
Lukas, I took a look at your proposal. It does seem that this might come
in handy there.
Thanks again for all of your input. Looking forward to the next round.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=393
--
Sent by PEPr, the automatic proposal system at http://pear.php.net