[PEPr] Comment on Web Services::OpenSearch
| From: | bertrand Gugger | Date: | Sat, 31 Dec 2005 08:08:06 +0000 |
| Subject: | [PEPr] Comment on Web Services::OpenSearch | ||
| References: | 1 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-40868@lists.php.net to get a copy of this message | ||
bertrand Gugger (http://pear.php.net/user/toggg) has commented on the proposal for Web
Services::OpenSearch.
Comment:
It's a clean integration of several pear packages.
* package's name: should be Services_OpenSearch as I guess it should be in
the Services category
* CS for methods, even if very short methods should not be packed on one
line, but rather have their block starting on next line as:
function getAdultContent()
{
return $this->_getDescription('AdultContent');
}
* Shouldn't private methods names start with an underscore ?
* It should be possible to change the url and not need to instanciate a
new one for it, perhaps that could be combined to solve Matthew's
question.
* That would be nice to be able to give the pager's options directly by
instanciation as an options array
* I would check the descrition returned in fetchDescription($url) has
effectively the '_got' element as it's a key for next extractions and not
rely on the data correctness
* Not sure if some cache mechanism could not save some requests here ...
* In setupQuery(), your use of str_replace() is incorrect, both search
and replace are simple arrays, the hash for replace has no meaning, only
element's order is important.
Proposal information:
http://pear.php.net/pepr/pepr-proposal-show.php?id=336
--
Sent by PEPr, the automatic proposal system at http://pear.php.net