12 namespace fpoirotte\XRL;
102 $context = stream_context_get_default();
106 throw new \InvalidArgumentException(
'Invalid context');
110 $encoder = new \fpoirotte\XRL\NativeEncoder(
111 new \fpoirotte\XRL\
Encoder(null,
false,
true)
116 $decoder = new \fpoirotte\XRL\NativeDecoder(
117 new \fpoirotte\XRL\
Decoder(null,
true)
156 public function __call($method, array $args)
158 $newArgs = array_map(
'\\fpoirotte\\XRL\\NativeEncoder::convert', $args);
159 $request = new \fpoirotte\XRL\Request($method, $newArgs);
160 $xml = $this->encoder->encodeRequest($request);
165 'header' =>
'Content-Type: text/xml',
169 stream_context_set_option($this->context, $options);
170 libxml_set_streams_context($this->context);
171 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. ...
$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.
__construct($baseURL,\fpoirotte\XRL\EncoderInterface $encoder=null,\fpoirotte\XRL\DecoderInterface $decoder=null, $context=null)