protected readAttribute ( SimpleXMLElement $node, string $attribute ) : string | ||
$node | SimpleXMLElement | The node to read from, *(not null not empty). |
$attribute | string | The attribute name, *(not null not empty). |
return | string | The attribute value, not null. |
protected function readAttribute(\SimpleXMLElement $node, $attribute)
{
$value = $node[$attribute];
if (!isset($value)) {
throw new XMLMissingAttribueException($attribute);
}
return $value;
}