ressio / pharse

Fastest PHP HTML Parser
83 stars 15 forks source link

setIndex function #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
        function setIndex($index) {
        if ($this->parent) {
            if ($index > $this->index()) {
                --$index;
            }
            $this->parent->deleteChild($this, true);
            $this->parent->addChild($this, $index);
        }
    }

Original issue reported on code.google.com by tha...@songphi.com on 17 May 2013 at 12:08