add function to get just the *value* of the attribute

This commit is contained in:
Michael Becker 2023-11-11 20:32:00 -05:00
parent af9d056d19
commit 67206b7904

View File

@ -163,8 +163,16 @@
} }
return $str; return $str;
} }
public function GetAttributeValue($name, $index = 0) : ?string
{
$attr = $this->GetAttribute($name, $index);
if ($attr != null)
return $attr->Value;
return null;
}
public function GetAttribute($name, $index = 0) public function GetAttribute($name, $index = 0) : ?MarkupAttribute
{ {
$i = 0; $i = 0;
$last = null; $last = null;