Newscoop\Service\Implementation\ThemeServiceLocalFileSystem::readAttribute PHP Method

readAttribute() protected method

This method will throw an exception in case the attribute is not specified.
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;
    }