gan_node_html.php
function wrapInner($node, $start = 0, $end = -1, $wrap_index = -1, $node_index = null) {
		if ($end < 0) {
			$end += count($this->children);
		}
		if ($node_index === null) {
			$node_index = $end + 1;
		}

		if (!is_object($node)) {
			$node = $this->addChild($node, $node_index);
		} elseif ($node->parent !== $this) {
			$node->changeParent($this->parent, $node_index);
		}

		$this->moveChildren($node, $wrap_index, $start, $end);
		return $node;
	}
function wrapInner($node, $start = 0, $end = -1, $wrap_index = -1, $node_index = null) {
		if ($end < 0) {
			$end += count($this->children);
		}
		if ($node_index === null) {
			$node_index = $end + 1;
		}

		if (!is_object($node)) {
			$node = $this->addChild($node, $node_index);
		} elseif ($node->parent !== $this) {
			$node->changeParent($this->parent, $node_index);
		}

		$this->moveChildren($node, $wrap_index, $start, $end);
		return $node;
	}
Wrap child nodes
@param string|DomNode $node Wrapping node, string to create new element node
@param int $start Index from child node where to start wrapping, 0 for first element
@param int $end Index from child node where to end wrapping, -1 for last element
@param int $wrap_index Index to insert in wrapping node, -1 to append
@param int $node_index Index to insert current node, null to keep at same position
@return DomNode Wrapping node