src/PHPHtmlParser/Dom/InnerNode.php
public function insertAfter(AbstractNode $child, int $id): bool
	{
		if (!isset($this->children[$id])) {
			return false;
		}

		if ($this->children[$id]['next']) {
			return $this->addChild($child, $this->children[$id]['next']);
		}

		// clear cache
		$this->clear();

		return $this->addChild($child);
	}
public function insertAfter(AbstractNode $child, int $id): bool
	{
		if (!isset($this->children[$id])) {
			return false;
		}

		if ($this->children[$id]['next']) {
			return $this->addChild($child, $this->children[$id]['next']);
		}

		// clear cache
		$this->clear();

		return $this->addChild($child);
	}
public function insertAfter ( AbstractNode $ child , int $ id ) : bool { if ( ! isset ( $ this -> children [ $ id ] ) ) { return false ; } if ( $ this -> children [ $ id ] [ 'next' ] ) { return $ this -> addChild ( $ child , $ this -> children [ $ id ] [ 'next' ] ) ; } // clear cache $ this -> clear ( ) ; return $ this -> addChild ( $ child ) ; }
Insert element before after with provided id

@param AbstractNode $child
@param int $id
@return bool
Insert element before after with provided id