FluentDOM\Node\ParentNode\Implementation::prepend PHP Method

prepend() public method

Insert nodes before the first child node
public prepend ( mixed $nodes )
$nodes mixed
    public function prepend($nodes)
    {
        /** @var \DOMNode|Implementation $this */
        if ($this->firstChild instanceof \DOMNode && ($nodes = MutationMacro::expand($this, $nodes))) {
            $this->insertBefore($nodes, $this->firstChild);
        } else {
            $this->append($nodes);
        }
    }