12 namespace fpoirotte\XRL;
99 array $options = array()
102 $encoder = new \fpoirotte\XRL\NativeEncoder(
103 new \fpoirotte\XRL\
Encoder(null,
false,
true)
108 $decoder = new \fpoirotte\XRL\NativeDecoder(
109 new \fpoirotte\XRL\
Decoder(null,
true)
114 $this->options = $options;
148 public function __call($method, array $args)
150 $newArgs = array_map(
'\\fpoirotte\\XRL\\NativeEncoder::convert', $args);
151 $request = new \fpoirotte\XRL\Request($method, $newArgs);
152 $xml = $this->encoder->encodeRequest($request);
157 'header' =>
'Content-Type: text/xml',
161 $context = stream_context_create(array_merge_recursive($this->options, $options));
162 libxml_set_streams_context(
$context);
163 return $this->decoder->decodeResponse($this->baseURL);
Interface for an XML-RPC decoder.
Interface for an XML-RPC encoder.
An XML-RPC encoder that can produce either compact documents or pretty documents. ...
__construct($baseURL,\fpoirotte\XRL\EncoderInterface $encoder=null,\fpoirotte\XRL\DecoderInterface $decoder=null, array $options=array())
$encoder
Encoder for the request.
$baseURL
The remote XML-RPC server's base URL.
$decoder
Decoder for the response.
__call($method, array $args)
A decoder that can process XML-RPC requests and responses, with optional XML validation.
$context
A stream context to use when querying the server.