Vilius Zaikauskas [2013-02-18 17:50 UTC]I have made some updates on https://www.github.com/Willux/PGraph . Let me know if I should submit another package.
Till Klampaeckel [2013-02-19 15:18 UTC]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.
Vilius Zaikauskas [2013-02-19 15:35 UTC]Till Klampaeckel: Thank you for the suggestions and the support. I will definitely address the comments. They are greatly appreciated!
Vilius Zaikauskas [2013-02-27 03:59 UTC]How much are namespaces encouraged?