PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » Web Services » XML_RPC » Bug #3121

different output method

Details

Request #3121different output method
Submitted2005-01-06 11:03 UTC
Fromvincent at dauphin-mm dot nl
Assigneddanielc
StatusClosed
PackageXML_RPC
PHP Version4.3.9
OSlinux
Roadmaps(Not assigned)

Comments

[2005-01-06 11:03 UTC] vincent at dauphin-mm dot nl

Description:
------------
It would be nice to be able to select a different output method instead of dumping the resulting output to stdout en setting the headers with the header() function.

It would be nice to have the result avaible in variables like $xmlrpc_server->headers (assoc array) and $xmlrpc_server->payload.

I would like this so I can use XML_RPC in combination with the pear HTTP_Server.

Reproduce code:
---------------
Something like this:

class HTTP_Server_XMLRPC extends HTTP_Server {

function POST($clientId, &$request) {
$GLOBALS['HTTP_RAW_POST_DATA'] = $request->content;

$server = new XML_RPC_Server($methodmap, $outputmethod);

return array(
'code' => 200,
'headers' => $server->headers,
'body' => $server->payload,
);
}
}