[PEPr] Comment on XML::XML_PullParser

From: Date: Fri, 10 Nov 2006 17:08:55 +0000
Subject: [PEPr] Comment on XML::XML_PullParser
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-44877@lists.php.net to get a copy of this message
Justin Patrin (http://pear.php.net/user/justinpatrin) has commented on the proposal for XML::XML_PullParser. Comment: No need to have the extra check for a path when including XML_PullParser_Errors.inc, the user's include_path can be used to include a different file if needed. I also don't really like that these are an a .inc file... Don't use global variables unless you absolutely must. I doubt that these global variables are actually needed. If you are targeting PHP4 use a static variable within a function or PEAR::getStaticProperty. If you are targeting PHP5 use static variables in either a function or class. I see lots of funcitons outside of the class. This is not ok. All of your code must be within a class. PEAR packages may not die(). Raise a PEAR_Error (if PHP4) or throw an extended PEAR_Exception (if PHP5). Your indenting is odd. Could you re-indent your code with 4 spaces per indent? Class methods should be indented inside the class as well. There is quite a bit of code in this one file. Would it be possible to refactor to use multiple classes? Proposal information: http://pear.php.net/pepr/pepr-proposal-show.php?id=455 -- Sent by PEPr, the automatic proposal system at http://pear.php.net

« previous php.pear.dev (#44877) next »