public function setOptions($options) { if ($options instanceof Zend_Config
) { $options =
$options->
toArray();
} if (!
is_array($options) && !
$options instanceof ArrayAccess
&& !
$options instanceof Traversable
) { throw new Zend_Http_UserAgent_Exception(sprintf( 'Invalid argument; expected array, Zend_Config object, or object implementing ArrayAccess and Traversable; received %s',
(is_object($options) ?
get_class($options) :
gettype($options)) ));
} // Set $_SERVER first
if (isset($options['server'
])) { $this->
setServer($options['server'
]);
unset($options['server'
]);
}