X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=src%2FResponse.php;h=e634ce57403fec0af9526e1be56cb7abfa00e003;hb=b337d292eb5b5656d27a2fc9ab6796be300c59a3;hp=cc33ebf67aaed65d4f6585fc2c88dd16f502b54f;hpb=affe41f5f2420693ea08b1b9496b6fc5dd786e20;p=plcapi.git diff --git a/src/Response.php b/src/Response.php index cc33ebf..e634ce5 100644 --- a/src/Response.php +++ b/src/Response.php @@ -11,6 +11,8 @@ use PhpXmlRpc\Helper\Charset; */ class Response { + protected static $charsetEncoder; + /// @todo: do these need to be public? /** @internal */ public $val = 0; @@ -26,6 +28,19 @@ class Response public $_cookies = array(); public $raw_data = ''; + public function getCharsetEncoder() + { + if (self::$charsetEncoder === null) { + self::$charsetEncoder = Charset::instance(); + } + return self::$charsetEncoder; + } + + public function setCharsetEncoder($charsetEncoder) + { + self::$charsetEncoder = $charsetEncoder; + } + /** * @param Value|string|mixed $val either a Value object, a php value or the xml serialization of an xmlrpc value (a string) * @param integer $fCode set it to anything but 0 to create an error response. In that case, $val is discarded