00001 <?php
00008 class XMLRPCCall {
00010 private $methodname;
00011
00013 private $params;
00014
00020 function __construct($xml) {
00021 $this->parse($xml);
00022 }
00023
00029 public function getMethodName() { return $this->methodname; }
00030
00038 public function getParameters() { return $this->params; }
00039
00048 private function parse($xml) {
00049 $xml = xml_to_object($xml);
00050
00051
00052 if ((isset($xml->name)) && (strcasecmp($xml->name, "methodCall") != 0)) {
00053 throw new CallException(elgg_echo('CallException:NotRPCCall'));
00054 }
00055
00056
00057 $this->methodname = $xml->children[0]->content;
00058
00059
00060 $this->params = $xml->children[1]->children;
00061 }
00062 }