Alan Knowles [2004-06-25 12:09 UTC] a usage example would be nice - otherwise looks perfectly OK.
Martin Jansen [2004-06-25 12:40 UTC] The code does not fully conform with our Coding Standards yet:
if($foo) {
should be
if ($foo) {
Markus Tacker [2004-06-25 12:51 UTC] > The code does not fully conform with our Coding Standards yet
Fixed.
Ian Eure [2004-06-25 17:36 UTC] Looks nice, but I'd like to see things cleaned up somewhat.
* Wrong class name in info().
* $fileContents is only used once and never unset. $decoded = $this->bdecode(file_get_contents($file)); is better, imo. (lines 144/5)
* Please use basename() to get the filename portion instead of strrpos(). (Line 146)
* getInfo() seems unnecessary, as the properties can be accessed directly.
* I'd like to see the BEn/Decode functions split into a seperate class.
* bdecode_rec() should use switch($t) { ... } instead of that big if/else. Same for bencode_rec().
* Better documentation of arguments & return values. I know that decode_int() returns an array, but what are in the elements? What's the point of the 'l' in these arrays, why not return the value directly?
|