ZF-3240: Zend_Http_Client: Documentation blocks out of sync, some features not documented in manual
Today I took closer look at Zend_Http_Client. Here is what I found out:
*__constructor* docblock lists non-existant parameter *$headers* whilst it doesnt list *$config* parameter
/** * Contructor method. Will create a new HTTP client. Accepts the target * URL and optionally and array of headers. * * @param Zend_Uri_Http|string $uri * @param array $headers Optional request headers to set */ public function __construct($uri = null, $config = null)
some methods are tagged with @throws and some are not. Mainly: * setConfig * setMethod * setHeaders * setCookieJar * setCookie * setFileUpload * setAuth * setAdapter * request * prepare_body * encodeAuthHeader
some methods are missing @return: * _setParameter * setAdapter
. I believe this should be
not documented in manual $config key storeresponse. Default value is true. It allows for retrieval of Zend_Http_Reponse after calling request by getLastResponse. If set to false getLastReponse will return null instead.
The manual states "When set to false, some validation functions will be skipped." about strict $config key. The problem is what some means. It should mention that when true it performs validation against header names to see if they contain forbidden characters.
non BC changes to consider: setAdapter doesnt have return statement, it could return $this to aid fluent interface like other set methods do