Re: [PEPr] Comment on System::System_Folders
| From: | Stefano F. Rausch | Date: | Fri, 17 Feb 2006 19:47:47 +0000 |
| Subject: | Re: [PEPr] Comment on System::System_Folders | ||
| References: | 1 2 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-41367@lists.php.net to get a copy of this message | ||
Well done Christian,
now everything works fine.
Just some further remarks:
- break the lines at approx. 80 - 85 chars per line, see the method getSharedDocuments, which needs to be fixed in this respect
- you're relying only on the English/US and German naming of the respective directories. What about other languages?
- would it make sense to you, if the paths' known names would be extracted to a separate file and retrieved from there, so that you can update the directories array without having to touch the code? E.g. you could use a multi dimensional array or an ini-file for that.
- what about a MacOS support? Maybe someone out of the community can give you the respective paths' names. Just ask for it.
- this is just my personal PoV: you're using the Hungarian Notation for your variables, which I find a little annoying. Take for example $arKnownPaths: the name does already imply an array for it is in plural, i.e. $knownPaths is already sufficient! However, having said this, your approach is not against any rules of the PCS - AFAIK.
Cheers
-- Stefano
P.S.: Du bist auf dem richtigen Weg!
Christian Weiske wrote:
Stefano,- require_once is a language construct and not a function - please try to be more PCS compliant, e.g. EOL at the file's end, file doc block not complete etc.All that has been fixed, and the folders should be detected correctly right now.