Re: [PEAR-DEV] Fwd: proposing a new package, questions about naming ..etc.
[email protected] ("Patrick E.") Sun, 26 May 2013 14:42:35 +0200
| Newsgroups | php.pear.dev |
|---|---|
| Message-ID | <CAKWbAD=BdJPL+eap2EGXGWdzSxjiCQHq40b34m-7bG69CLAzTw@mail.gmail.com> |
Hi, just a suggestion: You _could_ let the User inject an Object for the Request Getter/Setter, then you don't need to create an Instance in the Constructor and one is not bound to one implementation (a class that uses the curl extension). One could inject Services_Solr_Request_Sockets or an Wrapper of HTTP_Request2 instead of Services_Solr_Request_Curl, therefore they both need to implement an Interface like Services_Solr_Request, only. You could also provide a method like init() or connect() where you create the default RequestObject it if not given or set. > should it be called <Category>_<Name>, therefore Net_Solr or Services_Solr. The Name "Http" for a Class would not match that naming convention. Since the Class uses Curl, i would call it <Category>_Solr_Request_Curl, ie. Services_Solr_Request_Curl. you can also find a HowTo in the PEAR Docs : http://pear.php.net/manual/de/developers.contributing.howto.php -- Patrick