[PEPr] Comment on XML::cssparser
[email protected] ("Vasil Rangelov") Wed, 25 Sep 2013 14:44:45 +0100 (BST)
| Newsgroups | php.pear.dev |
|---|---|
| Message-ID | <[email protected]> |
Very interesting. Just two things: 1. Follow PEAR coding and naming standards. You aren't currently. Particularly problematic is the class "Parser" which is a name so common, that if not namespaced or prefixed is a recipe for disaster. 2. IMHO, it would be a lot more convinient if you have a constructor that does NOT accept a CSS selector, but only a base node, and maybe some parsing options. Only then, have the parse() method accept the selector. In fact, consider renaming it to something like "query()", "select()" or (better yet) "querySelector()" to be familiar to JS users. -- http://pear.php.net/pepr/pepr-proposal-show.php?id=697