Re: [PEAR-DEV] Fwd: proposing a new package, questions about naming ..etc.
[email protected] (Muayyad AlSadi) Sun, 26 May 2013 15:56:18 +0300
| Newsgroups | php.pear.dev |
|---|---|
| Message-ID | <CAM95Wt3tM87kVYOnZ-sJQUc+9ap2ZLZdb=ggz-TKUv91twQ28g@mail.gmail.com> |
hi > The Name "Http" for a Class would not match that naming convention. it seems that you missed the second file (called LiteSolr.php) in pastebin I've published it as a git repo on github https://github.com/muayyad-alsadi/php-lite-solr On Sun, May 26, 2013 at 3:42 PM, Patrick E. <[email protected]> wrote: > 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 >