[PEPr] Comment on PHP::PGraph

[email protected] ("Till Klampaeckel")
Newsgroups php.pear.dev
Message-ID <[email protected]>
This looks interesting. And it's an impressive piece of work!

A few comments (just browsed through the code briefly):

 * add some examples
 * find a common "namespace" and stack all classes into it — since you
mention PHP 5.3, why not go all the way with proper namespaces and move
this code into pear2? (http://pear2.php.net)
 * avoid global constants with define() — e.g. use class constants if
possible
 * I read somewhere that PEAR is only required when you install through it,
but there is a `require_once "PEAR.php";` in PGraph.php. if you get rid off
this, that would be great.
 * maybe add a `composer.json` for flexibility
 * check if `private` is really necessary or if you could do with
`protected` to make extending your code easier
 * you can simplify many of these:
https://github.com/Willux/PGraph/blob/master/src/PGraph.php#L630-L634
 * strip require_once calls and rely on autoload — either provide one or
let the user decide what they want to do.

-- 
http://pear.php.net/pepr/pepr-proposal-show.php?id=690
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.