Habari\HTMLNode::__get PHP Метод

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

Get the value of an attribute of this node
public __get ( string $name ) : mixed
$name string The name of the attribute value to obtain
Результат mixed The value of the attribute
    function __get($name)
    {
        switch ($name) {
            default:
                if ($attribute = $this->node->attributes->getNamedItem($name)) {
                    return $attribute->nodeValue;
                }
                if ($attribute = $this->node->attributes->getNamedItem(str_replace('_', '-', $name))) {
                    return $attribute->nodeValue;
                }
                return null;
        }
    }