Ejemplo n.º 1
0
 function offsetGet($key)
 {
     if (is_int($key)) {
         return $this->list_value[$key] = so_dom::make($this->list[$key]);
     }
     $list = array();
     foreach ($this as $item) {
         if ($item->name != $key) {
             continue;
         }
         $list[] = $item;
     }
     return so_dom_collection::make($list);
 }
Ejemplo n.º 2
0
 function getIterator()
 {
     $list = array();
     if ($attributes = $this->DOMNode->attributes) {
         foreach ($attributes as $child) {
             $list[] = $child;
         }
     }
     foreach ($this->DOMNode->childNodes as $child) {
         $list[] = $child;
     }
     return so_dom_collection::make($list)->getIterator();
 }