/** * */ public function saveXML() { $xml = ''; if (extension_loaded('WebServices')) { $xml = rpc_encode_request($this->_method, $this->_params, $this->_requestOptions); $xml = preg_replace("/>\n(\\s*)?(<?)/", '>$2', $xml); } else { $xml = parent::saveXML(); } return $xml; }
/** * Encodes rpc request to xmlrpc, jsonrpc or soap. * * Available options: * 'version' => {WS_XMLRPC|WS_SOAP|WS_JSONRPC} * 'verbosity' => {no_white_space|newlines_only|pretty} * 'escaping' => {cdata|non-ascii|non-print|markup} * 'encoding' => {iso-8859-1|utf-8} * * @param string $method Method name * @param mixed $params Method parameters * @param string $outputType Output type, can be one of WS_XMLRPC, WS_SOAP or WS_JSONRPC * @param array $outputOptions Associative array with options * @return string Encoded request * @deprecated Please use Streamwide_WebService_Client::rpcEncodeRequest instead. */ public static function rpcEncodeRequest($method, $params, $outputType, $outputOptions = array()) { // set output type in 'version' option $outputOptions['version'] = $outputType; return rpc_encode_request($method, $params, $outputOptions); }