ZF-5602: Wrong/misleading option 'host' vs 'baseUrl' in Zend_Service_Nirvanix


In the __construct() function of Zend_Service_Nirvanix, there's an array $defaultOptions that contains some options:

$defaultOptions = array('defaults' => array(), 'httpClient' => new Zend_Http_Client(), 'host' => 'http://services.nirvanix.com');

The key 'host' seems not to have any effect on the operation of this class, though. If we look in Zend_Service_Nirvanix_Namespace_Base, it contains:

protected $_host = 'http://services.nirvanix.com';

.. which can be configured via the 'baseUrl' option passed to Zend_Service_Nirvanix. Changing the 'host' option doesn't seem to have any effect; even passing array('host' => 'gobbledygook.random.url') as the $options param still lets you make calls to the Nirvanix service perfectly fine.

So I would suggest that at the least, the 'host' key were to be changed to 'baseUrl' in the $defaultOptions array to avoid confusion. Or, to avoid redundant variable definition, remove the 'host' option from the array altogether as it is specified in Zend_Service_Nirvanix_Namespace_Base. (although I then suggest it should be documented that passing the 'baseUrl' option changes the host that will be used)


Bulk change of all issues last updated before 1st January 2010 as "Won't Fix".

Feel free to re-open and provide a patch if you want to fix this issue.