[PEPr] Comment on XML::cssparser
| From: | Vasil Rangelov | Date: | Wed, 25 Sep 2013 13:44:45 +0000 |
| Subject: | [PEPr] Comment on XML::cssparser | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-55275@lists.php.net to get a copy of this message | ||
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