Lines Matching refs:pos

155 		$pos = $this->position++;
157 $this->message[$pos] = array('pos' => $pos,'children'=>'','cdata'=>'');
160 $this->message[$pos]['depth'] = $this->depth++;
163 if($pos != 0){
164 $this->message[$this->parent]['children'] .= '|'.$pos;
167 $this->message[$pos]['parent'] = $this->parent;
169 $this->parent = $pos;
171 $this->depth_array[$this->depth] = $pos;
183 $this->root_header = $pos;
187 $this->body_position = $pos;
189 } elseif($this->status == 'body' && $pos == ($this->body_position+1)){
192 $this->root_struct = $pos;
193 $this->message[$pos]['type'] = 'struct';
197 $this->message[$pos]['status'] = $this->status;
199 $this->message[$pos]['name'] = htmlspecialchars($name);
201 $this->message[$pos]['attrs'] = $attrs;
222 if (isset($this->message[$pos]['type']) && $this->message[$pos]['type'] == 'array') {
227 $this->message[$pos]['type'] = $value_localpart;
228 $this->message[$pos]['typePrefix'] = $value_prefix;
230 $this->message[$pos]['type_namespace'] = $this->namespaces[$value_prefix];
232 $this->message[$pos]['type_namespace'] = $attrs['xmlns:'.$value_prefix];
237 $this->message[$pos]['type'] = 'array';
248 $this->message[$pos]['typePrefix'] = $regs[1];
249 $this->message[$pos]['arrayTypePrefix'] = $regs[1];
251 $this->message[$pos]['arrayTypeNamespace'] = $this->namespaces[$regs[1]];
253 $this->message[$pos]['arrayTypeNamespace'] = $attrs['xmlns:'.$regs[1]];
255 $this->message[$pos]['arrayType'] = $regs[2];
256 $this->message[$pos]['arraySize'] = $regs[3];
257 $this->message[$pos]['arrayCols'] = $regs[4];
261 $this->message[$pos]['nil'] = ($value == 'true' || $value == '1');
264 $this->message[$pos]['xattrs']['!' . $key] = $value;
272 $this->ids[$value] = $pos;
278 $this->root_struct = $pos;
279 $this->debug("found root struct $this->root_struct_name, pos $pos");
286 $this->message[$pos]['namespace'] = $this->namespaces[$prefix];
289 $this->message[$pos]['namespace'] = $this->default_namespace;
292 if ($this->root_header != $pos) {
309 $pos = $this->depth_array[$this->depth--];
320 if(isset($this->body_position) && $pos > $this->body_position){
322 if(isset($this->message[$pos]['attrs']['href'])){
324 $id = substr($this->message[$pos]['attrs']['href'],1);
326 $this->multirefs[$id][$pos] = 'placeholder';
328 $this->message[$pos]['result'] =& $this->multirefs[$id][$pos];
330 } elseif($this->message[$pos]['children'] != ''){
332 if(!isset($this->message[$pos]['result'])){
333 $this->message[$pos]['result'] = $this->buildVal($pos);
336 } elseif (isset($this->message[$pos]['xattrs'])) {
337 if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) {
338 $this->message[$pos]['xattrs']['!'] = null;
339 } elseif (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') {
340 if (isset($this->message[$pos]['type'])) {
341pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['typ…
343 $parent = $this->message[$pos]['parent'];
345 …$this->message[$pos]['xattrs']['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->me…
347 $this->message[$pos]['xattrs']['!'] = $this->message[$pos]['cdata'];
351 $this->message[$pos]['result'] = $this->message[$pos]['xattrs'];
355 if (isset($this->message[$pos]['nil']) && $this->message[$pos]['nil']) {
356 $this->message[$pos]['xattrs']['!'] = null;
357 } elseif (isset($this->message[$pos]['type'])) {
358pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$pos]['type'], …
360 $parent = $this->message[$pos]['parent'];
362 …$this->message[$pos]['result'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message…
364 $this->message[$pos]['result'] = $this->message[$pos]['cdata'];
383 if ($this->root_header != $pos) {
386 } elseif($pos >= $this->root_struct){
390 if($pos == $this->root_struct){
392 $this->root_struct_namespace = $this->message[$pos]['namespace'];
401 $this->parent = $this->message[$pos]['parent'];
412 $pos = $this->depth_array[$this->depth];
421 $this->message[$pos]['cdata'] .= $data;
520 * @param integer $pos position in node tree
524 function buildVal($pos){ argument
525 if(!isset($this->message[$pos]['type'])){
526 $this->message[$pos]['type'] = '';
528 …this->debug('in buildVal() for '.$this->message[$pos]['name']."(pos $pos) of type ".$this->message…
530 if($this->message[$pos]['children'] != ''){
532 $children = explode('|',$this->message[$pos]['children']);
535 if(isset($this->message[$pos]['arrayCols']) && $this->message[$pos]['arrayCols'] != ''){
542 if($c == $this->message[$pos]['arrayCols']){
548 } elseif($this->message[$pos]['type'] == 'array' || $this->message[$pos]['type'] == 'Array'){
549 $this->debug('in buildVal, adding array '.$this->message[$pos]['name']);
554 …} elseif($this->message[$pos]['type'] == 'Map' && $this->message[$pos]['type_namespace'] == 'http:…
587 if (isset($this->message[$pos]['xattrs'])) {
589 foreach ($this->message[$pos]['xattrs'] as $n => $v) {
594 if (isset($this->message[$pos]['cdata']) && trim($this->message[$pos]['cdata']) != '') {
596 if (isset($this->message[$pos]['type'])) {
597 …ple($this->message[$pos]['cdata'], $this->message[$pos]['type'], isset($this->message[$pos]['type_…
599 $parent = $this->message[$pos]['parent'];
601 …$params['!'] = $this->decodeSimple($this->message[$pos]['cdata'], $this->message[$parent]['arrayTy…
603 $params['!'] = $this->message[$pos]['cdata'];
613 $cdata = isset($this->message[$pos]['cdata']) ? $this->message[$pos]['cdata'] : '';
614 if (isset($this->message[$pos]['type'])) {
615 …ecodeSimple($cdata, $this->message[$pos]['type'], isset($this->message[$pos]['type_namespace']) ? …
619 $parent = $this->message[$pos]['parent'];
625 $ret = $this->message[$pos]['cdata'];