Пример #1
0
 function explorer($a, DRW &$r)
 {
     while (list($i, $v) = _each($a, $k)) {
         if (isDrw($v)) {
             $this->explorer($v, $r);
         } else {
             $r->push(array($i => $v));
         }
     }
 }
Пример #2
0
 function each(&$k)
 {
     return _each($this->O, $k);
 }
 function replaceChild($new, $old = null)
 {
     if (!$this->more()) {
         if (isDrw($new) || type($new) == 'DRW') {
             while (list($i, $v) = _each($new, $k)) {
                 $this->replaceChild($i, $v);
             }
         }
         if (isEle($new) && isEle($old)) {
             $this->O->replaceChild($new, $old);
         }
     } else {
         foreach ($this->O as $v) {
             _($v)->replaceChild($new, $old);
         }
     }
     return $this;
 }