code: function setIndex($index) {
  		if ($this->parent) {
  			if ($index > $this->index()) {
  				--$index;
  			}
  			$this->delete();
  			$this->parent->addChild($this, $index);
  		}
  	}
docs: Change index of node in parent
  @param int $index New index