pQuery\DomNode::setTag PHP Метод

setTag() публичный Метод

Set tag (with or without namespace)
См. также: getTag()
public setTag ( string $tag, boolean $with_ns = false )
$tag string
$with_ns boolean Does $tag include namespace?
    function setTag($tag, $with_ns = false)
    {
        $with_ns = $with_ns || strpos($tag, ':') !== false;
        if ($with_ns) {
            $this->tag = $tag;
            $this->tag_ns = null;
        } elseif ($this->getTag() !== $tag) {
            $this->tag_ns[1] = $tag;
            $this->tag = ($this->tag_ns[0] ? $this->tag_ns[0] . ':' : '') . $tag;
        }
    }
DomNode