public function WsclientRestXMLFormatter::__construct in Web service client 7
Creates a HttpClientXMLFormatter.
Parameters
string $default_root: Optional. Defaults to 'result'. The default name that should be used for root elements, if $adaptive_root is set to FALSE the default name will always be used.
bool $adaptive_root: Optional. Defaults to FALSE. If $adaptive_root is set to TRUE and the source data has a single root attribute the serializer will use that attribute as root. The object {"foo":"bar"} would be serialized to <foo>bar</foo> instead of <result><foo>bar</foo></result>.
Overrides HttpClientXMLFormatter::__construct
File
- wsclient_rest/
wsclient_rest.inc, line 265 - Web service client REST - include file.
Class
Code
public function __construct($settings = array()) {
parent::__construct(!empty($settings['default_root']) ? $settings['default_root'] : NULL, !empty($settings['adaptive_root']) ? $settings['adaptive_root'] : NULL);
$this->settings = $settings;
}