Issues

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

Issue Type: Bug Created: 2009-01-21T13:02:59.000+0000 Last Updated: 2012-11-20T20:53:35.000+0000 Status: Closed Fix version(s): Reporter: Witek Radomski (witekr) Assignee: None Tags: - Zend_Service_Nirvanix

Related issues: Attachments:

Description

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)

Comments

Posted by Rob Allen (rob) on 2012-11-20T20:53:35.000+0000

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.

Have you found an issue?

See the Overview section for more details.

Copyright

© 2006-2016 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.

Contacts