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

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

Delete attribute(s)
public deleteAttribute ( string | integer $attr, string $compare = 'total', boolean $case_sensitive = false )
$attr string | integer Negative int to count from end
$compare string Find node using "namespace", "name" or "total"
$case_sensitive boolean Compare with case sensitivity
    function deleteAttribute($attr, $compare = 'total', $case_sensitive = false)
    {
        $f = $this->findAttribute($attr, $compare, $case_sensitive);
        if (is_array($f) && $f) {
            foreach ($f as $a) {
                unset($this->attributes[$a[2]]);
                if ($this->attributes_ns !== null) {
                    unset($this->attributes_ns[$a[1]]);
                }
            }
        }
    }
DomNode