PHPHtmlParser\Dom\AbstractNode::getAttribute PHP Méthode

getAttribute() public méthode

A wrapper method that simply calls the getAttribute method on the tag of this node.
public getAttribute ( string $key ) : mixed
$key string
Résultat mixed
    public function getAttribute($key)
    {
        $attribute = $this->tag->getAttribute($key);
        if (!is_null($attribute)) {
            $attribute = $attribute['value'];
        }
        return $attribute;
    }