Lines Matching refs:parser
248 $parser = (int) $parser_resource;
251 if ($XML_RPC_xh[$parser]['isf'] >= 2) {
257 if (count($XML_RPC_xh[$parser]['stack']) == 0) {
259 $XML_RPC_xh[$parser]['isf'] = 2;
260 $XML_RPC_xh[$parser]['isf_reason'] = 'missing top level xmlrpc element';
265 if (!in_array($XML_RPC_xh[$parser]['stack'][0], $XML_RPC_valid_parents[$name])) {
267 $XML_RPC_xh[$parser]['isf'] = 2;
268 …$XML_RPC_xh[$parser]['isf_reason'] = "xmlrpc element $name cannot be child of {$XML_RPC_xh[$parser…
275 $XML_RPC_xh[$parser]['cm']++;
278 $XML_RPC_xh[$parser]['qt'] = 0;
283 array_unshift($XML_RPC_xh[$parser]['valuestack'], $cur_val);
287 $XML_RPC_xh[$parser]['cm']++;
290 $XML_RPC_xh[$parser]['qt'] = 0;
295 array_unshift($XML_RPC_xh[$parser]['valuestack'], $cur_val);
299 $XML_RPC_xh[$parser]['ac'] = '';
303 $XML_RPC_xh[$parser]['isf'] = 1;
307 $XML_RPC_xh[$parser]['valuestack'] = array();
311 $XML_RPC_xh[$parser]['lv'] = 1;
312 $XML_RPC_xh[$parser]['vt'] = $GLOBALS['XML_RPC_String'];
313 $XML_RPC_xh[$parser]['ac'] = '';
314 $XML_RPC_xh[$parser]['qt'] = 0;
327 $XML_RPC_xh[$parser]['ac'] = ''; // reset the accumulator
330 $XML_RPC_xh[$parser]['qt'] = 1;
333 $XML_RPC_xh[$parser]['vt'] = $GLOBALS['XML_RPC_DateTime'];
337 $XML_RPC_xh[$parser]['qt'] = 2;
342 $XML_RPC_xh[$parser]['qt'] = 0;
347 $XML_RPC_xh[$parser]['ac'] = '';
361 array_unshift($XML_RPC_xh[$parser]['stack'], $name);
364 $XML_RPC_xh[$parser]['lv'] = 0;
377 $parser = (int) $parser_resource;
379 if ($XML_RPC_xh[$parser]['isf'] >= 2) {
387 $curr_elem = array_shift($XML_RPC_xh[$parser]['stack']);
392 $cur_val = array_shift($XML_RPC_xh[$parser]['valuestack']);
393 $XML_RPC_xh[$parser]['value'] = $cur_val['value'];
394 $XML_RPC_xh[$parser]['vt'] = strtolower($name);
395 $XML_RPC_xh[$parser]['cm']--;
399 $XML_RPC_xh[$parser]['valuestack'][0]['name'] = $XML_RPC_xh[$parser]['ac'];
405 if ($XML_RPC_xh[$parser]['ac'] == '1') {
406 $XML_RPC_xh[$parser]['ac'] = 'true';
408 $XML_RPC_xh[$parser]['ac'] = 'false';
411 $XML_RPC_xh[$parser]['vt'] = strtolower($name);
420 if ($XML_RPC_xh[$parser]['qt'] == 1) {
422 $XML_RPC_xh[$parser]['value'] = $XML_RPC_xh[$parser]['ac'];
423 } elseif ($XML_RPC_xh[$parser]['qt'] == 2) {
424 $XML_RPC_xh[$parser]['value'] = base64_decode($XML_RPC_xh[$parser]['ac']);
426 $XML_RPC_xh[$parser]['value'] = $XML_RPC_xh[$parser]['ac'];
430 if (!preg_match("@^[+-]?[0123456789 \t\.]+$@", $XML_RPC_xh[$parser]['ac'])) {
433 $XML_RPC_xh[$parser]['value'] = XML_RPC_ERROR_NON_NUMERIC_FOUND;
436 $XML_RPC_xh[$parser]['value'] = $XML_RPC_xh[$parser]['ac'];
440 $XML_RPC_xh[$parser]['ac'] = '';
441 $XML_RPC_xh[$parser]['qt'] = 0;
442 $XML_RPC_xh[$parser]['lv'] = 3; // indicate we've found a value
446 if ($XML_RPC_xh[$parser]['vt'] == $GLOBALS['XML_RPC_String']) {
447 if (strlen($XML_RPC_xh[$parser]['ac']) > 0) {
448 $XML_RPC_xh[$parser]['value'] = $XML_RPC_xh[$parser]['ac'];
449 } elseif ($XML_RPC_xh[$parser]['lv'] == 1) {
451 $XML_RPC_xh[$parser]['value'] = '';
455 $temp = new XML_RPC_Value($XML_RPC_xh[$parser]['value'], $XML_RPC_xh[$parser]['vt']);
457 $cur_val = array_shift($XML_RPC_xh[$parser]['valuestack']);
462 $XML_RPC_xh[$parser]['value'] = $temp;
464 array_unshift($XML_RPC_xh[$parser]['valuestack'], $cur_val);
466 $XML_RPC_xh[$parser]['value'] = $temp;
471 $XML_RPC_xh[$parser]['ac'] = '';
472 $XML_RPC_xh[$parser]['qt'] = 0;
474 $cur_val = array_shift($XML_RPC_xh[$parser]['valuestack']);
477 $cur_val['value'][$cur_val['name']] = $XML_RPC_xh[$parser]['value'];
479 array_unshift($XML_RPC_xh[$parser]['valuestack'], $cur_val);
484 $XML_RPC_xh[$parser]['ac'] = '';
485 $XML_RPC_xh[$parser]['qt'] = 0;
489 $XML_RPC_xh[$parser]['params'][] = $XML_RPC_xh[$parser]['value'];
494 $XML_RPC_xh[$parser]['method'] = preg_replace("@^[\n\r\t ]+@", '',
495 $XML_RPC_xh[$parser]['ac']);
501 $XML_RPC_xh[$parser]['vt'] = strtolower($name);
514 $parser = (int) $parser_resource;
516 if ($XML_RPC_xh[$parser]['lv'] != 3) {
520 if ($XML_RPC_xh[$parser]['lv'] == 1) {
523 $XML_RPC_xh[$parser]['qt'] = 1;
525 $XML_RPC_xh[$parser]['lv'] = 2;
530 if (!isset($XML_RPC_xh[$parser]['ac'])) {
531 $XML_RPC_xh[$parser]['ac'] = '';
533 $XML_RPC_xh[$parser]['ac'] .= $data;
1436 $parser = (int) $parser_resource;
1439 $XML_RPC_xh[$parser] = array();
1441 $XML_RPC_xh[$parser]['cm'] = 0;
1442 $XML_RPC_xh[$parser]['isf'] = 0;
1443 $XML_RPC_xh[$parser]['ac'] = '';
1444 $XML_RPC_xh[$parser]['qt'] = '';
1445 $XML_RPC_xh[$parser]['stack'] = array();
1446 $XML_RPC_xh[$parser]['valuestack'] = array();
1476 $XML_RPC_xh[$parser]['ha'] = substr($data, 0, $brpos);
1509 var_dump($XML_RPC_xh[$parser]['value']);
1513 if ($XML_RPC_xh[$parser]['isf'] > 1) {
1515 … $XML_RPC_str['invalid_return'].' '.$XML_RPC_xh[$parser]['isf_reason']);
1516 } elseif (!is_object($XML_RPC_xh[$parser]['value'])) {
1523 $v = $XML_RPC_xh[$parser]['value'];
1524 if ($XML_RPC_xh[$parser]['isf']) {
1533 $r->hdrs = preg_split("@\r?\n@", $XML_RPC_xh[$parser]['ha']);