Example #1
0
            if ($node instanceof Markup) {
                $this->head[$i] = clone $node;
            }
        }
        foreach ($this->innerHead as $i => $node) {
            if ($node instanceof Markup) {
                $this->innerHead[$i] = clone $node;
            }
        }
        foreach ($this->innerFoot as $i => $node) {
            if ($node instanceof Markup) {
                $this->innerFoot[$i] = clone $node;
            }
        }
        foreach ($this->foot as $i => $node) {
            if ($node instanceof Markup) {
                $this->foot[$i] = clone $node;
            }
        }
    }
    function getAncestor()
    {
        $ancestor = $this;
        do {
            $ancestor = $ancestor->parent;
        } while ($ancestor->parent);
        return $ancestor;
    }
}
Markup::initialize();