XMLParser::ACCEPT_REQUEST | XMLParser::ACCEPT_RESPONSE | XMLParser::ACCEPT_VALUE | XMLParser::ACCEPT_FAULT,
$parserOptions
);
- $_xh = $xmlRpcParser->_xh['isf'];
+ $_xh = $xmlRpcParser->_xh;
if ($_xh['isf'] > 1) {
// test that $_xh['value'] is an obj, too???
* @throws \Exception this can happen if a callback function is set and it does throw (i.e. we do not catch exceptions)
*
* @todo refactor? we could 1. return the parsed data structure, and 2. move $returnType and $accept into options
+ * @todo feature-creep make it possible to pass in options overriding usage of PhpXmlRpc::$xmlrpc_XXX_format, so
+ * that parsing will be completely independent of global state. Note that it might incur a small perf hit...
*/
public function parse($data, $returnType = self::RETURN_XMLRPCVALS, $accept = 3, $options = array())
{
* PhpXmlRpc::$xmlrpc_defencoding if it can't be determined and mbstring is not enabled
*
* @todo explore usage of mb_http_input(): does it detect http headers + post data? if so, use it instead of hand-detection!!!
+ * @todo feature-creep make it possible to pass in options overriding usage of PhpXmlRpc static variables, to make
+ * the method independent of global state
*/
public static function guessEncoding($httpHeader = '', $xmlChunk = '', $encodingPrefs = null)
{
$xmlRpcParser = $this->getParser();
$xmlRpcParser->parse($data, $returnType, XMLParser::ACCEPT_RESPONSE, $options);
- $_xh = $xmlRpcParser->_xh['isf'];
+ $_xh = $xmlRpcParser->_xh;
// first error check: xml not well-formed
if ($_xh['isf'] == 3) {
$xmlRpcParser = $this->getParser();
try {
$xmlRpcParser->parse($data, $this->functions_parameters_type, XMLParser::ACCEPT_REQUEST, $options);
- $_xh = $xmlRpcParser->_xh['isf'];
+ $_xh = $xmlRpcParser->_xh;
} catch (NoSuchMethodException $e) {
return new Response(0, $e->getCode(), $e->getMessage());
}