Exemplo n.º 1
0
 /**
  * Get sibling node
  * @param int $offset Offset from current node
  * @return HTML_Node Null if not found
  */
 function getSibling($offset = 1)
 {
     $index = $this->index() + $offset;
     if ($index >= 0 && $index < $this->parent->childCount()) {
         return $this->parent->getChild($index);
     } else {
         return null;
     }
 }